Created
November 16, 2008 18:14
-
-
Save makoto/25521 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Insertion and select all benchmarking | |
# Script mostly based from http://refactormycode.com/codes/240-datamapper-threaded-benchmark | |
# MySQL (InnoDB, No Index) | |
Rehearsal ------------------------------------------------------------- | |
DataMapper data insertion 1.090000 0.100000 1.190000 ( 1.970768) | |
DataMapper single-thread 0.020000 0.000000 0.020000 ( 0.019654) | |
DataMapper threaded 0.020000 0.000000 0.020000 ( 0.017503) | |
---------------------------------------------------- total: 1.230000sec | |
user system total real | |
DataMapper data insertion 1.050000 0.080000 1.130000 ( 1.871251) | |
DataMapper single-thread 0.010000 0.000000 0.010000 ( 0.014956) | |
DataMapper threaded 0.020000 0.000000 0.020000 ( 0.016412) | |
# MySQL (InnoDB, Index on all attributes) | |
Rehearsal ------------------------------------------------------------- | |
DataMapper data insertion 1.120000 0.090000 1.210000 ( 2.054741) | |
DataMapper single-thread 0.020000 0.000000 0.020000 ( 0.017557) | |
DataMapper threaded 0.010000 0.000000 0.010000 ( 0.016721) | |
---------------------------------------------------- total: 1.240000sec | |
user system total real | |
DataMapper data insertion 1.080000 0.070000 1.150000 ( 1.972999) | |
DataMapper single-thread 0.020000 0.000000 0.020000 ( 0.015062) | |
DataMapper threaded 0.010000 0.000000 0.010000 ( 0.018871) | |
# sqlite3 (no index) | |
Rehearsal ------------------------------------------------------------- | |
DataMapper data insertion 1.380000 0.810000 2.190000 ( 3.729262) | |
DataMapper single-thread 0.020000 0.000000 0.020000 ( 0.024203) | |
DataMapper threaded 0.020000 0.000000 0.020000 ( 0.024056) | |
---------------------------------------------------- total: 2.230000sec | |
user system total real | |
DataMapper data insertion 1.380000 0.820000 2.200000 ( 3.728082) | |
DataMapper single-thread 0.020000 0.000000 0.020000 ( 0.015879) | |
DataMapper threaded 0.020000 0.000000 0.020000 ( 0.017940) | |
# sqlite3 (Index on all attributes) | |
makoto-inoues-macbook:datamapper-threaded-benchmark makoto$ ruby datamapper-threaded-benchmark.rb | |
Rehearsal ------------------------------------------------------------- | |
DataMapper data insertion 1.490000 1.040000 2.530000 ( 4.912816) | |
DataMapper single-thread 0.020000 0.000000 0.020000 ( 0.021813) | |
DataMapper threaded 0.010000 0.000000 0.010000 ( 0.021355) | |
---------------------------------------------------- total: 2.560000sec | |
user system total real | |
DataMapper data insertion 1.440000 1.020000 2.460000 ( 4.877027) | |
DataMapper single-thread 0.010000 0.000000 0.010000 ( 0.015638) | |
DataMapper threaded 0.020000 0.000000 0.020000 ( 0.017282) | |
# dm-tokyo-cabinet-adapter (All data and index files are BDB. All test passing.) | |
Rehearsal ------------------------------------------------------------- | |
DataMapper data insertion 1.760000 0.970000 2.730000 ( 2.847345) | |
DataMapper single-thread 13.420000 14.260000 27.680000 ( 36.688142) | |
DataMapper threaded 9.630000 7.240000 16.870000 ( 17.395976) | |
--------------------------------------------------- total: 47.280000sec | |
user system total real | |
DataMapper data insertion 2.710000 1.170000 3.880000 ( 4.190638) | |
DataMapper single-thread 28.790000 28.330000 57.120000 ( 75.374310) | |
DataMapper threaded 19.880000 14.580000 34.460000 ( 35.613746) | |
# dm-tokyo-cabinet-adapter (All index files are FDB. Many failed test, so functionality is not guaranteed.) | |
Rehearsal ------------------------------------------------------------- | |
DataMapper data insertion 1.040000 0.520000 1.560000 ( 1.678125) | |
DataMapper single-thread 0.070000 0.020000 0.090000 ( 0.093816) | |
DataMapper threaded 0.030000 0.030000 0.060000 ( 0.057660) | |
---------------------------------------------------- total: 1.710000sec | |
user system total real | |
DataMapper data insertion 1.130000 0.490000 1.620000 ( 1.659695) | |
DataMapper single-thread 0.030000 0.030000 0.060000 ( 0.056772) | |
DataMapper threaded 0.030000 0.020000 0.050000 ( 0.070436) | |
# dm-tokyo-cabinet-adapter (No indexes. Items.bdb only. Many failed tests. This is a bit useless as you can't find by eql condition) | |
makoto-inoues-macbook:datamapper-threaded-benchmark makoto$ ruby datamapper-threaded-benchmark.rb | |
Rehearsal ------------------------------------------------------------- | |
DataMapper data insertion 0.680000 0.180000 0.860000 ( 1.129168) | |
DataMapper single-thread 0.070000 0.030000 0.100000 ( 0.108444) | |
DataMapper threaded 0.040000 0.030000 0.070000 ( 0.076015) | |
---------------------------------------------------- total: 1.030000sec | |
user system total real | |
DataMapper data insertion 0.750000 0.180000 0.930000 ( 0.957739) | |
DataMapper single-thread 0.030000 0.030000 0.060000 ( 0.076678) | |
DataMapper threaded 0.040000 0.030000 0.070000 ( 0.080246) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment