1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

SinatraやRailsでRubyのベンチマークを取る

Last updated at Posted at 2021-05-18

見出しはGitHubのリポジトリ名。 bundle install 以降の手順のみ紹介。

benchmark-driver/sinatra

WARMUP=10000 REQUESTS=20000 ruby bench.rb

k0kubun/railsbench

bundle exec rake db:create db:migrate db:seed RAILS_ENV=production
bundle exec rake assets:precompile RAILS_ENV=production
WARMUP=10000 BENCHMARK=10000 ruby bin/bench

k0kubun/rsb

noahgibbs/rsb の fork

cd rails_test_app
WARMUP=10000 BENCHMARK=10000 ruby bin/bench

k0kubun/discourse

discourse/discourse v2.6.7 の fork

docker-compose up # leave it, and go to another window

bundle exec rake db:create db:migrate RAILS_ENV=profile
sudo apt install brotli # used by assets:precompile
ruby script/bench.rb # prepare seeds and precompile assets. this takes waaaaay long time. Be prepared.
WARMUP=1000 BENCHMARK=1000 ruby bin/bench

Content-Security-Policy ヘッダが壊れているので、ブラウザで動作確認する場合は config.middleware.swap ActionDispatch::ContentSecurityPolicy::Middleware, ContentSecurityPolicy::Middleware をコメントアウトする。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?