Skip to content

Instantly share code, notes, and snippets.

@sanemat
Created September 2, 2011 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanemat/1187953 to your computer and use it in GitHub Desktop.
Save sanemat/1187953 to your computer and use it in GitHub Desktop.
benchmark with empty database and fully database
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
$ perl -v
This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-2level
# perl with empty database
$ perl -Mlib=extlib/lib/perl5 extlib/bin/plackup -s Starman -E production --reload-app app.psgi
NODE_PATH=lib node bench.js team01 standalone
{ teamid: 'team01',
resulttime: Fri, 02 Sep 2011 04:50:29 GMT,
test: true,
score: 5529,
bench:
{ fetches: 5529,
'max parallel': 2,
bytes: 179404000,
seconds: 60,
'mean bytes/connection': 32447.8,
'msecs/connect': { mean: 0.243909, max: 10.153, min: 0.069 },
response: { success: 5529, error: 0 },
responseCode: { '200': 5529 } },
checker:
{ checker: { summary: 'success' },
poster: { summary: 'success' } } }
# ruby with empty database
$ bundle exec rackup -s thin -p 5000 -E production
$ NODE_PATH=lib node bench.js team01 standalone
{ teamid: 'team01',
resulttime: Fri, 02 Sep 2011 04:54:27 GMT,
test: true,
score: 418,
bench:
{ fetches: 418,
'max parallel': 2,
bytes: 13300800,
seconds: 60,
'mean bytes/connection': 31820.2,
'fetches/sec': 6.96667,
'bytes/sec': 221681,
'msecs/connect': { mean: 0.158955, max: 0.376, min: 0.074 },
'msecs/first-response': { mean: 11.5218, max: 45.542, min: 0.797 },
response: { success: 418, error: 0 },
responseCode: { '200': 418 } },
checker:
{ checker: { summary: 'success' },
poster: { summary: 'success' } } }
# perl with fully data database
$ NODE_PATH=lib node bench.js team01 standalone
{ teamid: 'team01',
resulttime: Fri, 02 Sep 2011 04:58:36 GMT,
test: true,
score: 68,
bench:
{ fetches: 68,
'max parallel': 2,
bytes: 2427440,
seconds: 60.0001,
'mean bytes/connection': 35697.6,
'fetches/sec': 1.13333,
'bytes/sec': 40457.2,
'msecs/connect': { mean: 0.339912, max: 3.3, min: 0.11 },
'msecs/first-response': { mean: 1579.68, max: 8178.48, min: 0.643 },
response: { success: 68, error: 0 },
responseCode: { '200': 68 } },
checker:
{ checker: { summary: 'success' },
poster: { summary: 'success' } } }
# ruby with fully data database
$ NODE_PATH=lib node bench.js team01 standalone
{ teamid: 'team01',
resulttime: Fri, 02 Sep 2011 05:02:16 GMT,
test: true,
score: 81,
bench:
{ fetches: 81,
'max parallel': 2,
bytes: 3547890,
seconds: 60.0009,
'mean bytes/connection': 43801.1,
'fetches/sec': 1.34998,
'bytes/sec': 59130.6,
'msecs/connect': { mean: 0.376506, max: 7.522, min: 0.084 },
'msecs/first-response': { mean: 1443.38, max: 5273.59, min: 1.281 },
response: { success: 81, error: 0 },
responseCode: { '200': 81 } },
checker:
{ checker: { summary: 'success' },
poster: { summary: 'success' } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment