Rails-1.2.3ã2.1.2ã2.2.2ã2.3 ã®æ§è½ã®å¤é· (render :text ã«ã¦)
Rails-2.3 ã® RC1 ãã¾ã 触ã£ã¦ãªãã£ãã®ã§ãã¤ã³ã¹ãã¼ã«ãã¦ã試ãã¦ã¿ã¾ããã
render :text => "Hello World!" ãªã¢ããªã«å¯¾ãã¦ãApache Bench ããè² è·ããããã¹ã«ã¼ãããã®å¹³å (5åè¨æ¸¬ããæ大ã¨æå°ãé¤ãã¦å¹³åå¤ãç®åº) ãã¨ã£ã¦ãã¾ãã
2.1 ã«æ¯ã¹ã¦ 2.2 ã§ã¹ã«ã¼ãããæ§è½ãããªãè½ã¡ãã®ãã2.3 RC1 ã§ã¯å°ã復活ãã¦ããããã§ãããã¾ããthreadsafe ãªãã·ã§ã³ã®å¹è½ã¯ããã§ã¯ãã¾ãè¦ããã¾ããã§ããã
# 1.x ç³»ãã 2.x ç³»ã¯å¤§ããªé£èºãããã¾ããããMerb ãã¼ã¹ã¨ãªã 3.x ç³»ã«ãæå¾
ã§ããã¨å¬ããã§ããã :-p
çµæ
ãã¼ã¸ã§ã³ | å¹³åå¤ [#/sec] | ãã¹ã¦ã®è¨æ¸¬å¤ [#/sec] |
---|---|---|
Rails-2.3 RC1 | 377.75 | 350.03, 381.57, 375.1, 376.57, 381.83 |
Rails-2.3 RC1 (threadsafe!) | 322.07 | 315.51, 320.87, 317.72, 327.63, 330.15 |
Rails-2.2.2 | 329.04 | 326.77, 335.3, 326.37, 328.55, 331.8 |
Rails-2.2.2 (threadsafe!) | 333.12 | 336.42, 338.0, 337.36, 325.58, 276.85 |
Rails-2.1.2 | 440.97 | 435.08, 440.06, 445.48, 441.13, 441.72 |
Rails-1.2.3 | 59.86 | 79.98, 63.47, 58.56, 57.56, 56.1 |
ç°å¢
- iMac (intel Core 2 Duo 2.33GHz)
- Mac OS X 10.5.6
- å¦çç³»ãã©ã¤ãã©ãªã®ãã¼ã¸ã§ã³ã¯ä»¥ä¸ã®ã¨ãã
% ruby186 -v ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-darwin9.6.0] % gem list --local rails *** LOCAL GEMS *** rails (2.3.0, 2.2.2, 2.1.2, 1.2.3) mongrel (1.1.5)
- HelloWorld ã¢ããª
% rails _x.x.x_ helloworld # x.x.x ã«ã¯ Rails ã®ãã¼ã¸ã§ã³ % cd helloworld % ruby186 script/generate controller tests % vi app/controllers/tests_controller.rb class TestsController < ApplicationController def index render :text => "Hello World!" end end a % ruby186 script/server -e production % curl http://127.0.0.1:3000/tests Hello World!% % ab -n 10000 -c 10 http://127.0.0.1:3000/tests