Skip to content

Instantly share code, notes, and snippets.

@just-the-v
Last active October 8, 2023 09:32
Show Gist options
  • Select an option

  • Save just-the-v/606b7ad4900f8c09f4e09a9d8d239765 to your computer and use it in GitHub Desktop.

Select an option

Save just-the-v/606b7ad4900f8c09f4e09a9d8d239765 to your computer and use it in GitHub Desktop.
Trilogy benchmark
# i run this code direclty in my rails console
ActiveRecord::Base.logger = nil
Benchmark.bm do |x|
50.times do |i|
x.report "#{i}/ find" do
Employee.find(20000)
end
end
50.times do |i|
x.report "#{i}/ pluck" do
Employee.pluck(:salary)
end
end
50.times do |i|
x.report "#{i}/ find 1000 times in 5 threads" do
threads = []
5.times do
threads << Thread.new do
1000.times do
Employee.find(Employee.pluck(:id).sample)
end
end
end
threads.each(&:join)
end
end
50.times do |i|
x.report "#{i}/ sum with joins 1000 times in 5 threads" do
threads = []
5.times do
threads << Thread.new do
1000.times do
Employee.joins(:performance_reviews).where(performance_reviews: { score: rand(0..100) }).sum(:salary)
end
end
end
threads.each(&:join)
end
end
50.times do |i|
x.report "#{i}/ update employee" do
threads = []
5.times do
threads << Thread.new do
1000.times do
Employee.find(Employee.pluck(:id).sample).update(name: Faker::Name.name)
end
end
end
threads.each(&:join)
end
end
end
#mysql
# user system total real
# 0/ find 1000 times in 5 threads 21.956037 13.436088 35.392125 ( 33.115908)
# 1/ find 1000 times in 5 threads 22.148492 14.251162 36.399654 ( 34.387981)
# 2/ find 1000 times in 5 threads 21.917278 13.815014 35.732292 ( 33.404670)
# 3/ find 1000 times in 5 threads 22.023697 14.168575 36.192272 ( 34.818964)
# 4/ find 1000 times in 5 threads 22.449826 14.844804 37.294630 ( 35.119068)
# 5/ find 1000 times in 5 threads 22.267895 14.524508 36.792403 ( 34.475372)
# 6/ find 1000 times in 5 threads 22.101103 13.974447 36.075550 ( 34.298340)
# 7/ find 1000 times in 5 threads 21.965746 13.984423 35.950169 ( 33.784568)
# 8/ find 1000 times in 5 threads 21.838132 13.922002 35.760134 ( 34.017505)
# 9/ find 1000 times in 5 threads 21.895160 13.924207 35.819367 ( 34.226827)
# 10/ find 1000 times in 5 threads 22.033483 14.094878 36.128361 ( 34.252976)
# 11/ find 1000 times in 5 threads 21.973041 13.911125 35.884166 ( 33.815821)
# 12/ find 1000 times in 5 threads 21.987070 14.050737 36.037807 ( 34.680221)
# 13/ find 1000 times in 5 threads 22.034750 13.964107 35.998857 ( 34.135395)
# 14/ find 1000 times in 5 threads 21.952438 13.876176 35.828614 ( 34.143801)
# 15/ find 1000 times in 5 threads 21.903440 13.818977 35.722417 ( 34.057180)
# 16/ find 1000 times in 5 threads 21.943966 13.879587 35.823553 ( 34.105953)
# 17/ find 1000 times in 5 threads 21.825019 13.591064 35.416083 ( 34.300312)
# 18/ find 1000 times in 5 threads 21.918134 14.284396 36.202530 ( 33.988140)
# 19/ find 1000 times in 5 threads 22.018835 14.516432 36.535267 ( 35.072115)
# 20/ find 1000 times in 5 threads 21.905949 13.807657 35.713606 ( 33.830505)
# 21/ find 1000 times in 5 threads 22.158809 14.807206 36.966015 ( 34.824533)
# 22/ find 1000 times in 5 threads 22.011519 14.113531 36.125050 ( 34.220514)
# 23/ find 1000 times in 5 threads 21.974535 14.100705 36.075240 ( 33.120752)
# 24/ find 1000 times in 5 threads 22.122580 14.036814 36.159394 ( 33.178017)
# 25/ find 1000 times in 5 threads 22.048672 13.994174 36.042846 ( 33.188242)
# 26/ find 1000 times in 5 threads 22.015545 14.204468 36.220013 ( 33.338550)
# 27/ find 1000 times in 5 threads 21.851940 13.901500 35.753440 ( 32.712003)
# 28/ find 1000 times in 5 threads 21.901248 14.073554 35.974802 ( 33.507539)
# 29/ find 1000 times in 5 threads 21.930952 14.037627 35.968579 ( 33.565322)
# 30/ find 1000 times in 5 threads 21.949338 14.024331 35.973669 ( 33.647221)
# 31/ find 1000 times in 5 threads 22.246570 14.609112 36.855682 ( 34.832007)
# 32/ find 1000 times in 5 threads 22.038783 14.009999 36.048782 ( 34.606776)
# 33/ find 1000 times in 5 threads 21.880163 14.015635 35.895798 ( 34.522506)
# 34/ find 1000 times in 5 threads 22.021692 14.314265 36.335957 ( 33.933608)
# 35/ find 1000 times in 5 threads 22.047487 14.193737 36.241224 ( 34.347981)
# 36/ find 1000 times in 5 threads 22.086769 13.973647 36.060416 ( 33.706257)
# 37/ find 1000 times in 5 threads 22.067550 14.253821 36.321371 ( 34.172997)
# 38/ find 1000 times in 5 threads 22.041954 14.110725 36.152679 ( 34.597113)
# 39/ find 1000 times in 5 threads 21.992403 14.326878 36.319281 ( 34.403723)
# 40/ find 1000 times in 5 threads 21.956597 14.078315 36.034912 ( 34.033734)
# 41/ find 1000 times in 5 threads 22.110652 13.863396 35.974048 ( 35.604772)
# 42/ find 1000 times in 5 threads 21.993995 14.014299 36.008294 ( 34.287957)
# 43/ find 1000 times in 5 threads 22.325998 14.756474 37.082472 ( 34.983985)
# 44/ find 1000 times in 5 threads 22.146767 14.569954 36.716721 ( 34.815923)
# 45/ find 1000 times in 5 threads 22.092001 14.543992 36.635993 ( 35.368248)
# 46/ find 1000 times in 5 threads 21.923158 14.010750 35.933908 ( 34.940259)
# 47/ find 1000 times in 5 threads 21.919273 14.049627 35.968900 ( 34.886426)
# 48/ find 1000 times in 5 threads 22.007935 14.189006 36.196941 ( 34.357300)
# 49/ find 1000 times in 5 threads 22.489590 14.474203 36.963793 ( 35.479173)
# 0/ sum with joins 1000 times in 5 threads 2.055907 0.247618 2.303525 ( 6.052489)
# 1/ sum with joins 1000 times in 5 threads 2.132192 0.264949 2.397141 ( 6.496184)
# 2/ sum with joins 1000 times in 5 threads 2.163405 0.262413 2.425818 ( 6.840970)
# 3/ sum with joins 1000 times in 5 threads 2.371042 0.291504 2.662546 ( 6.731590)
# 4/ sum with joins 1000 times in 5 threads 2.350865 0.304568 2.655433 ( 6.741796)
# 5/ sum with joins 1000 times in 5 threads 2.415893 0.303869 2.719762 ( 6.443649)
# 6/ sum with joins 1000 times in 5 threads 2.472134 0.312156 2.784290 ( 6.618772)
# 7/ sum with joins 1000 times in 5 threads 2.485970 0.318998 2.804968 ( 6.799268)
# 8/ sum with joins 1000 times in 5 threads 1.784712 0.182771 1.967483 ( 6.200043)
# 9/ sum with joins 1000 times in 5 threads 2.396519 0.302747 2.699266 ( 6.998756)
# 10/ sum with joins 1000 times in 5 threads 2.307635 0.301568 2.609203 ( 6.807743)
# 11/ sum with joins 1000 times in 5 threads 2.308319 0.304046 2.612365 ( 6.697703)
# 12/ sum with joins 1000 times in 5 threads 2.372504 0.318821 2.691325 ( 6.795438)
# 13/ sum with joins 1000 times in 5 threads 2.455846 0.319086 2.774932 ( 6.549458)
# 14/ sum with joins 1000 times in 5 threads 2.441257 0.309570 2.750827 ( 6.535883)
# 15/ sum with joins 1000 times in 5 threads 2.514673 0.323167 2.837840 ( 6.695189)
# 16/ sum with joins 1000 times in 5 threads 2.471495 0.318752 2.790247 ( 6.607689)
# 17/ sum with joins 1000 times in 5 threads 2.440017 0.314359 2.754376 ( 6.760428)
# 18/ sum with joins 1000 times in 5 threads 2.376787 0.310220 2.687007 ( 6.652179)
# 19/ sum with joins 1000 times in 5 threads 2.366786 0.309055 2.675841 ( 6.657439)
# 20/ sum with joins 1000 times in 5 threads 2.425538 0.322785 2.748323 ( 6.750293)
# 21/ sum with joins 1000 times in 5 threads 2.123031 0.248503 2.371534 ( 6.509970)
# 22/ sum with joins 1000 times in 5 threads 2.482150 0.320831 2.802981 ( 6.766819)
# 23/ sum with joins 1000 times in 5 threads 2.424884 0.297650 2.722534 ( 6.426202)
# 24/ sum with joins 1000 times in 5 threads 2.458572 0.307270 2.765842 ( 6.714925)
# 25/ sum with joins 1000 times in 5 threads 2.451484 0.307982 2.759466 ( 6.805364)
# 26/ sum with joins 1000 times in 5 threads 2.383430 0.308462 2.691892 ( 6.645973)
# 27/ sum with joins 1000 times in 5 threads 2.305000 0.300051 2.605051 ( 6.607362)
# 28/ sum with joins 1000 times in 5 threads 2.431633 0.314198 2.745831 ( 6.822583)
# 29/ sum with joins 1000 times in 5 threads 2.446884 0.313338 2.760222 ( 6.622113)
# 30/ sum with joins 1000 times in 5 threads 2.521244 0.322387 2.843631 ( 6.586580)
# 31/ sum with joins 1000 times in 5 threads 2.509522 0.323842 2.833364 ( 6.692876)
# 32/ sum with joins 1000 times in 5 threads 2.531632 0.324299 2.855931 ( 6.638018)
# 33/ sum with joins 1000 times in 5 threads 2.501182 0.322662 2.823844 ( 6.819524)
# 34/ sum with joins 1000 times in 5 threads 2.379821 0.311763 2.691584 ( 6.757914)
# 35/ sum with joins 1000 times in 5 threads 2.350674 0.309874 2.660548 ( 6.584698)
# 36/ sum with joins 1000 times in 5 threads 2.353750 0.307786 2.661536 ( 6.637939)
# 37/ sum with joins 1000 times in 5 threads 2.265390 0.273400 2.538790 ( 6.520633)
# 38/ sum with joins 1000 times in 5 threads 2.324548 0.283731 2.608279 ( 6.806471)
# 39/ sum with joins 1000 times in 5 threads 2.460402 0.313512 2.773914 ( 6.650617)
# 40/ sum with joins 1000 times in 5 threads 2.479723 0.317980 2.797703 ( 6.746633)
# 41/ sum with joins 1000 times in 5 threads 2.431032 0.304656 2.735688 ( 6.660593)
# 42/ sum with joins 1000 times in 5 threads 2.364160 0.302892 2.667052 ( 6.555675)
# 43/ sum with joins 1000 times in 5 threads 2.317078 0.306697 2.623775 ( 6.624029)
# 44/ sum with joins 1000 times in 5 threads 2.312240 0.302618 2.614858 ( 6.591251)
# 45/ sum with joins 1000 times in 5 threads 2.437951 0.315399 2.753350 ( 6.693634)
# 46/ sum with joins 1000 times in 5 threads 2.525896 0.318747 2.844643 ( 6.669079)
# 47/ sum with joins 1000 times in 5 threads 2.541678 0.328959 2.870637 ( 6.703298)
# 48/ sum with joins 1000 times in 5 threads 2.548607 0.328868 2.877475 ( 6.695047)
# 49/ sum with joins 1000 times in 5 threads 2.514111 0.322721 2.836832 ( 6.756649)
# 0/ update employee 27.345598 17.274882 44.620480 ( 42.473821)
# 1/ update employee 24.917754 17.393804 42.311558 ( 40.179621)
# 2/ update employee 24.648865 16.817670 41.466535 ( 39.783366)
# 3/ update employee 24.366215 16.825459 41.191674 ( 39.609338)
# 4/ update employee 24.459504 17.032380 41.491884 ( 39.576436)
# 5/ update employee 24.444444 16.923149 41.367593 ( 39.328585)
# 6/ update employee 24.473932 16.715244 41.189176 ( 39.894176)
# 7/ update employee 24.272269 16.558136 40.830405 ( 39.547820)
# 8/ update employee 24.256562 16.517358 40.773920 ( 39.513370)
# 9/ update employee 24.326927 16.530616 40.857543 ( 39.613187)
# 10/ update employee 24.160449 16.123515 40.283964 ( 39.527390)
# 11/ update employee 24.141780 16.087621 40.229401 ( 39.328937)
# 12/ update employee 24.199073 16.605979 40.805052 ( 39.566835)
# 13/ update employee 24.265913 16.530089 40.796002 ( 39.648998)
# 14/ update employee 24.058997 15.792443 39.851440 ( 39.023656)
# 15/ update employee 24.065567 16.035171 40.100738 ( 39.495166)
# 16/ update employee 24.134701 16.036439 40.171140 ( 39.506745)
# 17/ update employee 24.040515 15.950412 39.990927 ( 39.460168)
# 18/ update employee 24.167795 16.074615 40.242410 ( 39.423281)
# 19/ update employee 24.076865 16.013393 40.090258 ( 39.589078)
# 20/ update employee 24.143585 16.109865 40.253450 ( 39.540033)
# 21/ update employee 24.011992 15.696098 39.708090 ( 39.227506)
# 22/ update employee 24.098015 15.904070 40.002085 ( 39.475896)
# 23/ update employee 24.050859 15.824202 39.875061 ( 39.376109)
# 24/ update employee 24.063799 15.962005 40.025804 ( 39.346022)
# 25/ update employee 24.035213 15.891121 39.926334 ( 39.490172)
# 26/ update employee 24.093874 16.210609 40.304483 ( 39.628595)
# 27/ update employee 24.037308 15.894257 39.931565 ( 39.366620)
# 28/ update employee 24.097761 16.023228 40.120989 ( 39.604368)
# 29/ update employee 24.108174 15.970408 40.078582 ( 39.328307)
# 30/ update employee 24.026549 15.837575 39.864124 ( 39.359861)
# 31/ update employee 24.154736 16.200082 40.354818 ( 39.555524)
# 32/ update employee 23.976568 15.776879 39.753447 ( 39.430012)
# 33/ update employee 23.768520 15.108410 38.876930 ( 39.245307)
# 34/ update employee 23.978408 15.537575 39.515983 ( 39.321890)
# 35/ update employee 24.083755 15.886730 39.970485 ( 39.149120)
# 36/ update employee 23.931330 15.544216 39.475546 ( 39.529924)
# 37/ update employee 23.853609 15.325297 39.178906 ( 39.019604)
# 38/ update employee 23.893659 15.433302 39.326961 ( 39.252114)
# 39/ update employee 23.768809 15.261544 39.030353 ( 39.004156)
# 40/ update employee 24.023687 15.615951 39.639638 ( 39.716699)
# 41/ update employee 23.978937 15.472156 39.451093 ( 39.019697)
# 42/ update employee 23.963355 15.726705 39.690060 ( 39.131159)
# 43/ update employee 24.007603 16.057517 40.065120 ( 39.411821)
# 44/ update employee 23.959817 15.791659 39.751476 ( 39.390745)
# 45/ update employee 23.976586 15.810912 39.787498 ( 39.334065)
# 46/ update employee 24.048170 15.713436 39.761606 ( 39.612366)
# 47/ update employee 23.916618 15.629484 39.546102 ( 39.274787)
# 48/ update employee 23.803382 15.461160 39.264542 ( 39.556545)
# 49/ update employee 24.116902 15.949637 40.066539 ( 39.409120)
# 0/ find 0.033648 0.011830 0.045478 ( 0.186492)
# 1/ find 0.000164 0.000025 0.000189 ( 0.001113)
# 2/ find 0.000109 0.000020 0.000129 ( 0.000266)
# 3/ find 0.000101 0.000024 0.000125 ( 0.000244)
# 4/ find 0.000256 0.000033 0.000289 ( 0.000404)
# 5/ find 0.000100 0.000020 0.000120 ( 0.000234)
# 6/ find 0.000093 0.000016 0.000109 ( 0.000235)
# 7/ find 0.000101 0.000024 0.000125 ( 0.000239)
# 8/ find 0.000093 0.000023 0.000116 ( 0.000229)
# 9/ find 0.000090 0.000020 0.000110 ( 0.000221)
# 10/ find 0.000092 0.000020 0.000112 ( 0.000223)
# 11/ find 0.000089 0.000019 0.000108 ( 0.000220)
# 12/ find 0.000089 0.000020 0.000109 ( 0.000221)
# 13/ find 0.000132 0.000024 0.000156 ( 0.000267)
# 14/ find 0.000118 0.000022 0.000140 ( 0.000247)
# 15/ find 0.000096 0.000023 0.000119 ( 0.000251)
# 16/ find 0.000092 0.000017 0.000109 ( 0.000216)
# 17/ find 0.000108 0.000053 0.000161 ( 0.000283)
# 18/ find 0.000105 0.000018 0.000123 ( 0.000203)
# 19/ find 0.000095 0.000016 0.000111 ( 0.000189)
# 20/ find 0.000092 0.000016 0.000108 ( 0.000209)
# 21/ find 0.000090 0.000015 0.000105 ( 0.000185)
# 22/ find 0.000090 0.000015 0.000105 ( 0.000183)
# 23/ find 0.000127 0.000023 0.000150 ( 0.000228)
# 24/ find 0.000296 0.000053 0.000349 ( 0.000569)
# 25/ find 0.000237 0.000035 0.000272 ( 0.000523)
# 26/ find 0.000104 0.000016 0.000120 ( 0.000246)
# 27/ find 0.000093 0.000016 0.000109 ( 0.000215)
# 28/ find 0.000095 0.000026 0.000121 ( 0.000251)
# 29/ find 0.000097 0.000021 0.000118 ( 0.000221)
# 30/ find 0.000094 0.000015 0.000109 ( 0.000253)
# 31/ find 0.000096 0.000016 0.000112 ( 0.000230)
# 32/ find 0.000093 0.000016 0.000109 ( 0.000256)
# 33/ find 0.000086 0.000015 0.000101 ( 0.000210)
# 34/ find 0.000084 0.000016 0.000100 ( 0.000210)
# 35/ find 0.000081 0.000015 0.000096 ( 0.000203)
# 36/ find 0.000081 0.000016 0.000097 ( 0.000203)
# 37/ find 0.000081 0.000013 0.000094 ( 0.000200)
# 38/ find 0.000085 0.000019 0.000104 ( 0.000217)
# 39/ find 0.000084 0.000023 0.000107 ( 0.000217)
# 40/ find 0.000079 0.000018 0.000097 ( 0.000211)
# 41/ find 0.000079 0.000019 0.000098 ( 0.000209)
# 42/ find 0.000078 0.000016 0.000094 ( 0.000270)
# 43/ find 0.000078 0.000012 0.000090 ( 0.000258)
# 44/ find 0.000078 0.000018 0.000096 ( 0.000210)
# 45/ find 0.000077 0.000018 0.000095 ( 0.000203)
# 46/ find 0.000080 0.000018 0.000098 ( 0.000212)
# 47/ find 0.000079 0.000019 0.000098 ( 0.000209)
# 48/ find 0.000080 0.000024 0.000104 ( 0.000215)
# 49/ find 0.000078 0.000019 0.000097 ( 0.000208)
# 0/ pluck 0.007300 0.001259 0.008559 ( 0.027666)
# 1/ pluck 0.006507 0.001163 0.007670 ( 0.018120)
# 2/ pluck 0.006012 0.001087 0.007099 ( 0.015453)
# 3/ pluck 0.008089 0.000973 0.009062 ( 0.016297)
# 4/ pluck 0.005990 0.000966 0.006956 ( 0.013696)
# 5/ pluck 0.005628 0.000996 0.006624 ( 0.012126)
# 6/ pluck 0.005401 0.000870 0.006271 ( 0.013020)
# 7/ pluck 0.005238 0.000871 0.006109 ( 0.013095)
# 8/ pluck 0.005125 0.000947 0.006072 ( 0.012549)
# 9/ pluck 0.005175 0.000847 0.006022 ( 0.011417)
# 10/ pluck 0.005847 0.000856 0.006703 ( 0.011361)
# 11/ pluck 0.004974 0.000825 0.005799 ( 0.009024)
# 12/ pluck 0.005394 0.000939 0.006333 ( 0.024671)
# 13/ pluck 0.005157 0.000923 0.006080 ( 0.013031)
# 14/ pluck 0.005180 0.000874 0.006054 ( 0.013002)
# 15/ pluck 0.005160 0.000908 0.006068 ( 0.011289)
# 16/ pluck 0.004977 0.000841 0.005818 ( 0.011769)
# 17/ pluck 0.005700 0.000888 0.006588 ( 0.012354)
# 18/ pluck 0.004920 0.000792 0.005712 ( 0.010715)
# 19/ pluck 0.004789 0.000740 0.005529 ( 0.007351)
# 20/ pluck 0.004831 0.000794 0.005625 ( 0.014633)
# 21/ pluck 0.004788 0.000762 0.005550 ( 0.008584)
# 22/ pluck 0.004631 0.000781 0.005412 ( 0.011627)
# 23/ pluck 0.004555 0.000753 0.005308 ( 0.011095)
# 24/ pluck 0.005311 0.000743 0.006054 ( 0.007858)
# 25/ pluck 0.004674 0.000786 0.005460 ( 0.012178)
# 26/ pluck 0.004740 0.000828 0.005568 ( 0.011782)
# 27/ pluck 0.004648 0.000712 0.005360 ( 0.007205)
# 28/ pluck 0.004541 0.000779 0.005320 ( 0.012095)
# 29/ pluck 0.004478 0.000779 0.005257 ( 0.011072)
# 30/ pluck 0.004538 0.000776 0.005314 ( 0.014745)
# 31/ pluck 0.005359 0.000794 0.006153 ( 0.013553)
# 32/ pluck 0.004830 0.000775 0.005605 ( 0.012393)
# 33/ pluck 0.004838 0.000815 0.005653 ( 0.012531)
# 34/ pluck 0.004836 0.000817 0.005653 ( 0.011311)
# 35/ pluck 0.004782 0.000776 0.005558 ( 0.007535)
# 36/ pluck 0.004660 0.000762 0.005422 ( 0.011797)
# 37/ pluck 0.004640 0.000748 0.005388 ( 0.007204)
# 38/ pluck 0.005417 0.000797 0.006214 ( 0.013135)
# 39/ pluck 0.004907 0.000772 0.005679 ( 0.011495)
# 40/ pluck 0.004738 0.000807 0.005545 ( 0.010926)
# 41/ pluck 0.004738 0.000765 0.005503 ( 0.007349)
# 42/ pluck 0.004629 0.000783 0.005412 ( 0.012193)
# 43/ pluck 0.004502 0.000726 0.005228 ( 0.007020)
# 44/ pluck 0.004461 0.000741 0.005202 ( 0.012538)
# 45/ pluck 0.005191 0.000776 0.005967 ( 0.012487)
# 46/ pluck 0.004563 0.000697 0.005260 ( 0.007032)
# 47/ pluck 0.004516 0.000730 0.005246 ( 0.011805)
# 48/ pluck 0.004557 0.000759 0.005316 ( 0.011633)
# 49/ pluck 0.004467 0.000705 0.005172 ( 0.007115)
#trilogy
# user system total real
# 0/ find 1000 times in 5 threads 8.520888 0.727386 9.248274 ( 10.808858)
# 1/ find 1000 times in 5 threads 8.280027 0.669526 8.949553 ( 10.062730)
# 2/ find 1000 times in 5 threads 8.268025 0.652106 8.920131 ( 9.950298)
# 3/ find 1000 times in 5 threads 8.247730 0.652294 8.900024 ( 9.921172)
# 4/ find 1000 times in 5 threads 8.245033 0.654663 8.899696 ( 9.912037)
# 5/ find 1000 times in 5 threads 8.261932 0.648949 8.910881 ( 9.977246)
# 6/ find 1000 times in 5 threads 8.270518 0.650929 8.921447 ( 9.934601)
# 7/ find 1000 times in 5 threads 8.241668 0.648691 8.890359 ( 9.861540)
# 8/ find 1000 times in 5 threads 8.268379 0.651465 8.919844 ( 9.944223)
# 9/ find 1000 times in 5 threads 8.319230 0.658667 8.977897 ( 10.008592)
# 10/ find 1000 times in 5 threads 8.275353 0.660753 8.936106 ( 9.957215)
# 11/ find 1000 times in 5 threads 8.293229 0.661002 8.954231 ( 9.979092)
# 12/ find 1000 times in 5 threads 8.343198 0.677991 9.021189 ( 10.122054)
# 13/ find 1000 times in 5 threads 8.569150 0.732128 9.301278 ( 10.988928)
# 14/ find 1000 times in 5 threads 8.581120 0.722016 9.303136 ( 11.100129)
# 15/ find 1000 times in 5 threads 8.665567 0.736388 9.401955 ( 11.226208)
# 16/ find 1000 times in 5 threads 8.563209 0.714911 9.278120 ( 11.087778)
# 17/ find 1000 times in 5 threads 8.579858 0.708942 9.288800 ( 11.026199)
# 18/ find 1000 times in 5 threads 8.610701 0.717912 9.328613 ( 11.118196)
# 19/ find 1000 times in 5 threads 8.611847 0.711117 9.322964 ( 11.117725)
# 20/ find 1000 times in 5 threads 8.692143 0.724855 9.416998 ( 11.201028)
# 21/ find 1000 times in 5 threads 8.742150 0.738059 9.480209 ( 11.214947)
# 22/ find 1000 times in 5 threads 8.644393 0.712162 9.356555 ( 11.251098)
# 23/ find 1000 times in 5 threads 8.642094 0.714874 9.356968 ( 11.238069)
# 24/ find 1000 times in 5 threads 8.610217 0.717546 9.327763 ( 11.134152)
# 25/ find 1000 times in 5 threads 8.655369 0.715942 9.371311 ( 11.223908)
# 26/ find 1000 times in 5 threads 8.650433 0.718000 9.368433 ( 11.151406)
# 27/ find 1000 times in 5 threads 8.630181 0.716923 9.347104 ( 11.061338)
# 28/ find 1000 times in 5 threads 8.649512 0.717397 9.366909 ( 11.227551)
# 29/ find 1000 times in 5 threads 8.668190 0.711169 9.379359 ( 11.168102)
# 30/ find 1000 times in 5 threads 8.592746 0.716928 9.309674 ( 11.134470)
# 31/ find 1000 times in 5 threads 8.585973 0.718937 9.304910 ( 10.878007)
# 32/ find 1000 times in 5 threads 8.568539 0.707378 9.275917 ( 10.888260)
# 33/ find 1000 times in 5 threads 8.549516 0.713815 9.263331 ( 10.957299)
# 34/ find 1000 times in 5 threads 8.583726 0.718444 9.302170 ( 11.173017)
# 35/ find 1000 times in 5 threads 8.571833 0.707682 9.279515 ( 11.132229)
# 36/ find 1000 times in 5 threads 8.580322 0.705322 9.285644 ( 11.118186)
# 37/ find 1000 times in 5 threads 8.892850 0.786055 9.678905 ( 11.738046)
# 38/ find 1000 times in 5 threads 8.767569 0.751683 9.519252 ( 11.114462)
# 39/ find 1000 times in 5 threads 9.214516 0.863891 10.078407 ( 11.629531)
# 40/ find 1000 times in 5 threads 8.672865 0.701840 9.374705 ( 11.340265)
# 41/ find 1000 times in 5 threads 8.615275 0.694447 9.309722 ( 11.281995)
# 42/ find 1000 times in 5 threads 8.561963 0.673574 9.235537 ( 11.264992)
# 43/ find 1000 times in 5 threads 8.630943 0.693098 9.324041 ( 11.083443)
# 44/ find 1000 times in 5 threads 8.663925 0.700042 9.363967 ( 11.329398)
# 45/ find 1000 times in 5 threads 8.819008 0.747471 9.566479 ( 11.369817)
# 46/ find 1000 times in 5 threads 9.101222 0.815613 9.916835 ( 11.709927)
# 47/ find 1000 times in 5 threads 8.954084 0.778718 9.732802 ( 11.499246)
# 48/ find 1000 times in 5 threads 8.915330 0.769061 9.684391 ( 11.438504)
# 49/ find 1000 times in 5 threads 8.954073 0.780707 9.734780 ( 11.375658)
# 0/ sum with joins 1000 times in 5 threads 2.060228 0.203249 2.263477 ( 5.903428)
# 1/ sum with joins 1000 times in 5 threads 2.191846 0.214491 2.406337 ( 6.552751)
# 2/ sum with joins 1000 times in 5 threads 2.191133 0.215523 2.406656 ( 7.223662)
# 3/ sum with joins 1000 times in 5 threads 2.151254 0.212203 2.363457 ( 7.266727)
# 4/ sum with joins 1000 times in 5 threads 2.172234 0.215681 2.387915 ( 7.245868)
# 5/ sum with joins 1000 times in 5 threads 2.082098 0.206961 2.289059 ( 7.368453)
# 6/ sum with joins 1000 times in 5 threads 2.221043 0.222683 2.443726 ( 6.988803)
# 7/ sum with joins 1000 times in 5 threads 2.163844 0.211014 2.374858 ( 7.302005)
# 8/ sum with joins 1000 times in 5 threads 2.041543 0.205923 2.247466 ( 7.351847)
# 9/ sum with joins 1000 times in 5 threads 2.008598 0.193577 2.202175 ( 7.465240)
# 10/ sum with joins 1000 times in 5 threads 1.897885 0.189119 2.087004 ( 6.957895)
# 11/ sum with joins 1000 times in 5 threads 2.319784 0.226257 2.546041 ( 7.128017)
# 12/ sum with joins 1000 times in 5 threads 2.314503 0.226257 2.540760 ( 7.238172)
# 13/ sum with joins 1000 times in 5 threads 2.352431 0.225099 2.577530 ( 7.128202)
# 14/ sum with joins 1000 times in 5 threads 2.135518 0.205982 2.341500 ( 7.297541)
# 15/ sum with joins 1000 times in 5 threads 2.095414 0.206587 2.302001 ( 7.338975)
# 16/ sum with joins 1000 times in 5 threads 2.240731 0.221701 2.462432 ( 7.200718)
# 17/ sum with joins 1000 times in 5 threads 2.302135 0.218678 2.520813 ( 7.218251)
# 18/ sum with joins 1000 times in 5 threads 2.341449 0.224743 2.566192 ( 7.099053)
# 19/ sum with joins 1000 times in 5 threads 2.424836 0.231494 2.656330 ( 6.692038)
# 20/ sum with joins 1000 times in 5 threads 1.947111 0.185660 2.132771 ( 7.509788)
# 21/ sum with joins 1000 times in 5 threads 2.208803 0.210708 2.419511 ( 7.323546)
# 22/ sum with joins 1000 times in 5 threads 2.226144 0.211803 2.437947 ( 7.200656)
# 23/ sum with joins 1000 times in 5 threads 2.129212 0.208878 2.338090 ( 7.266911)
# 24/ sum with joins 1000 times in 5 threads 2.049119 0.205727 2.254846 ( 7.348323)
# 25/ sum with joins 1000 times in 5 threads 2.319737 0.223598 2.543335 ( 7.160033)
# 26/ sum with joins 1000 times in 5 threads 2.323624 0.222200 2.545824 ( 7.186874)
# 27/ sum with joins 1000 times in 5 threads 2.359468 0.226185 2.585653 ( 7.168483)
# 28/ sum with joins 1000 times in 5 threads 2.178067 0.212877 2.390944 ( 7.328087)
# 29/ sum with joins 1000 times in 5 threads 2.266840 0.220665 2.487505 ( 7.231504)
# 30/ sum with joins 1000 times in 5 threads 2.195427 0.210260 2.405687 ( 7.260438)
# 31/ sum with joins 1000 times in 5 threads 2.161901 0.214154 2.376055 ( 7.251647)
# 32/ sum with joins 1000 times in 5 threads 2.223394 0.223837 2.447231 ( 7.193664)
# 33/ sum with joins 1000 times in 5 threads 2.253968 0.217223 2.471191 ( 7.217995)
# 34/ sum with joins 1000 times in 5 threads 2.300424 0.218821 2.519245 ( 7.157356)
# 35/ sum with joins 1000 times in 5 threads 2.234837 0.215479 2.450316 ( 7.173080)
# 36/ sum with joins 1000 times in 5 threads 2.296804 0.222949 2.519753 ( 7.220933)
# 37/ sum with joins 1000 times in 5 threads 2.072238 0.201777 2.274015 ( 7.725158)
# 38/ sum with joins 1000 times in 5 threads 2.046196 0.210296 2.256492 ( 6.801966)
# 39/ sum with joins 1000 times in 5 threads 2.319013 0.215519 2.534532 ( 7.185552)
# 40/ sum with joins 1000 times in 5 threads 2.092081 0.207058 2.299139 ( 6.357877)
# 41/ sum with joins 1000 times in 5 threads 2.199561 0.216757 2.416318 ( 6.756364)
# 42/ sum with joins 1000 times in 5 threads 2.234481 0.207358 2.441839 ( 6.666451)
# 43/ sum with joins 1000 times in 5 threads 2.009663 0.204082 2.213745 ( 6.884360)
# 44/ sum with joins 1000 times in 5 threads 2.077476 0.197663 2.275139 ( 7.228309)
# 45/ sum with joins 1000 times in 5 threads 2.046529 0.183897 2.230426 ( 7.189611)
# 46/ sum with joins 1000 times in 5 threads 2.001856 0.175698 2.177554 ( 6.994941)
# 47/ sum with joins 1000 times in 5 threads 1.983118 0.182842 2.165960 ( 7.198579)
# 48/ sum with joins 1000 times in 5 threads 1.998845 0.178330 2.177175 ( 7.051306)
# 49/ sum with joins 1000 times in 5 threads 2.106491 0.265149 2.371640 ( 7.154452)
# 0/ update employee 13.498651 1.247016 14.745667 ( 16.748427)
# 1/ update employee 10.656589 0.971029 11.627618 ( 13.157296)
# 2/ update employee 10.375079 0.976660 11.351739 ( 12.991866)
# 3/ update employee 10.364150 0.990406 11.354556 ( 12.801418)
# 4/ update employee 10.259826 0.967565 11.227391 ( 12.743869)
# 5/ update employee 10.288537 0.969682 11.258219 ( 12.709911)
# 6/ update employee 10.324250 0.970839 11.295089 ( 12.995399)
# 7/ update employee 10.288426 0.971462 11.259888 ( 12.760895)
# 8/ update employee 10.255367 0.963176 11.218543 ( 12.705328)
# 9/ update employee 10.265688 0.963705 11.229393 ( 12.662913)
# 10/ update employee 10.297020 0.967510 11.264530 ( 12.833114)
# 11/ update employee 10.306672 0.978601 11.285273 ( 12.747553)
# 12/ update employee 10.301513 0.968044 11.269557 ( 12.842014)
# 13/ update employee 10.277512 0.965479 11.242991 ( 12.701689)
# 14/ update employee 10.315315 0.967544 11.282859 ( 12.756631)
# 15/ update employee 10.273741 0.971368 11.245109 ( 12.680901)
# 16/ update employee 10.299100 0.971133 11.270233 ( 12.725622)
# 17/ update employee 10.281871 0.967526 11.249397 ( 12.802521)
# 18/ update employee 10.294414 0.970634 11.265048 ( 12.730761)
# 19/ update employee 10.310178 0.970915 11.281093 ( 12.727430)
# 20/ update employee 10.292062 0.968599 11.260661 ( 12.813784)
# 21/ update employee 10.285907 0.963110 11.249017 ( 12.828212)
# 22/ update employee 10.283039 0.972954 11.255993 ( 12.682025)
# 23/ update employee 10.300692 0.966040 11.266732 ( 12.680101)
# 24/ update employee 10.296578 0.964173 11.260751 ( 12.773397)
# 25/ update employee 10.267322 0.963896 11.231218 ( 12.628128)
# 26/ update employee 10.261394 0.950156 11.211550 ( 12.799921)
# 27/ update employee 10.240943 0.954404 11.195347 ( 12.650316)
# 28/ update employee 10.256790 0.965021 11.221811 ( 12.824044)
# 29/ update employee 10.275204 0.948605 11.223809 ( 12.911402)
# 30/ update employee 10.289713 0.945212 11.234925 ( 12.772802)
# 31/ update employee 10.262977 0.953254 11.216231 ( 12.771940)
# 32/ update employee 10.273809 0.961209 11.235018 ( 12.830505)
# 33/ update employee 10.266449 0.953568 11.220017 ( 12.831736)
# 34/ update employee 10.257330 0.953748 11.211078 ( 12.997346)
# 35/ update employee 10.259896 0.958307 11.218203 ( 12.865918)
# 36/ update employee 10.261478 0.957001 11.218479 ( 12.809807)
# 37/ update employee 10.269655 0.953753 11.223408 ( 12.790745)
# 38/ update employee 10.327256 0.973650 11.300906 ( 13.148921)
# 39/ update employee 10.254852 0.950417 11.205269 ( 12.822613)
# 40/ update employee 10.241502 0.955428 11.196930 ( 12.702392)
# 41/ update employee 10.227827 0.948851 11.176678 ( 12.707576)
# 42/ update employee 10.212341 0.942375 11.154716 ( 12.745159)
# 43/ update employee 10.234921 0.951196 11.186117 ( 12.761063)
# 44/ update employee 10.515087 1.034138 11.549225 ( 13.083499)
# 45/ update employee 10.293133 0.998535 11.291668 ( 12.739886)
# 46/ update employee 10.628075 1.054799 11.682874 ( 13.474698)
# 47/ update employee 9.819691 0.896501 10.716192 ( 12.542560)
# 48/ update employee 9.858905 0.907448 10.766353 ( 12.533137)
# 49/ update employee 9.799669 0.889983 10.689652 ( 12.389270)
# 0/ find 0.000219 0.000027 0.000246 ( 0.001275)
# 1/ find 0.000071 0.000011 0.000082 ( 0.000726)
# 2/ find 0.000056 0.000010 0.000066 ( 0.000188)
# 3/ find 0.000051 0.000008 0.000059 ( 0.000175)
# 4/ find 0.000070 0.000015 0.000085 ( 0.000185)
# 5/ find 0.000065 0.000009 0.000074 ( 0.000154)
# 6/ find 0.000051 0.000008 0.000059 ( 0.000135)
# 7/ find 0.000049 0.000008 0.000057 ( 0.000175)
# 8/ find 0.000049 0.000008 0.000057 ( 0.000128)
# 9/ find 0.000048 0.000007 0.000055 ( 0.000127)
# 10/ find 0.000047 0.000008 0.000055 ( 0.000126)
# 11/ find 0.000047 0.000008 0.000055 ( 0.000129)
# 12/ find 0.000061 0.000008 0.000069 ( 0.000139)
# 13/ find 0.000060 0.000010 0.000070 ( 0.000140)
# 14/ find 0.000048 0.000008 0.000056 ( 0.000136)
# 15/ find 0.000048 0.000008 0.000056 ( 0.000130)
# 16/ find 0.000048 0.000008 0.000056 ( 0.000127)
# 17/ find 0.000047 0.000007 0.000054 ( 0.000157)
# 18/ find 0.000047 0.000008 0.000055 ( 0.000128)
# 19/ find 0.000047 0.000007 0.000054 ( 0.000122)
# 20/ find 0.000046 0.000008 0.000054 ( 0.000125)
# 21/ find 0.000046 0.000008 0.000054 ( 0.000127)
# 22/ find 0.000046 0.000008 0.000054 ( 0.000440)
# 23/ find 0.000046 0.000008 0.000054 ( 0.000131)
# 24/ find 0.000047 0.000008 0.000055 ( 0.000123)
# 25/ find 0.000046 0.000008 0.000054 ( 0.000124)
# 26/ find 0.000046 0.000008 0.000054 ( 0.000156)
# 27/ find 0.000046 0.000008 0.000054 ( 0.000133)
# 28/ find 0.000045 0.000008 0.000053 ( 0.000135)
# 29/ find 0.000046 0.000008 0.000054 ( 0.000151)
# 30/ find 0.000051 0.000009 0.000060 ( 0.000140)
# 31/ find 0.000055 0.000008 0.000063 ( 0.000142)
# 32/ find 0.000057 0.000008 0.000065 ( 0.000144)
# 33/ find 0.000051 0.000009 0.000060 ( 0.000141)
# 34/ find 0.000051 0.000009 0.000060 ( 0.000135)
# 35/ find 0.000053 0.000014 0.000067 ( 0.000247)
# 36/ find 0.000052 0.000009 0.000061 ( 0.000250)
# 37/ find 0.000050 0.000008 0.000058 ( 0.000242)
# 38/ find 0.000049 0.000008 0.000057 ( 0.000137)
# 39/ find 0.000048 0.000008 0.000056 ( 0.000140)
# 40/ find 0.000048 0.000008 0.000056 ( 0.000136)
# 41/ find 0.000047 0.000007 0.000054 ( 0.000132)
# 42/ find 0.000046 0.000008 0.000054 ( 0.000140)
# 43/ find 0.000046 0.000008 0.000054 ( 0.000138)
# 44/ find 0.000046 0.000008 0.000054 ( 0.000136)
# 45/ find 0.000046 0.000008 0.000054 ( 0.000130)
# 46/ find 0.000047 0.000008 0.000055 ( 0.000156)
# 47/ find 0.000045 0.000006 0.000051 ( 0.000806)
# 48/ find 0.000045 0.000008 0.000053 ( 0.000129)
# 49/ find 0.000045 0.000007 0.000052 ( 0.000119)
# 0/ pluck 0.002784 0.000105 0.002889 ( 0.015096)
# 1/ pluck 0.002774 0.000096 0.002870 ( 0.011195)
# 2/ pluck 0.002745 0.000099 0.002844 ( 0.007832)
# 3/ pluck 0.002710 0.000052 0.002762 ( 0.004367)
# 4/ pluck 0.002588 0.000066 0.002654 ( 0.004189)
# 5/ pluck 0.002522 0.000075 0.002597 ( 0.009699)
# 6/ pluck 0.003405 0.000051 0.003456 ( 0.004692)
# 7/ pluck 0.002882 0.000079 0.002961 ( 0.004358)
# 8/ pluck 0.002607 0.000046 0.002653 ( 0.004142)
# 9/ pluck 0.002631 0.000052 0.002683 ( 0.007018)
# 10/ pluck 0.002637 0.000054 0.002691 ( 0.004094)
# 11/ pluck 0.002584 0.000051 0.002635 ( 0.004056)
# 12/ pluck 0.002548 0.000038 0.002586 ( 0.004120)
# 13/ pluck 0.003241 0.000075 0.003316 ( 0.007001)
# 14/ pluck 0.002789 0.000037 0.002826 ( 0.004240)
# 15/ pluck 0.002604 0.000032 0.002636 ( 0.004032)
# 16/ pluck 0.002660 0.000043 0.002703 ( 0.004171)
# 17/ pluck 0.002716 0.000092 0.002808 ( 0.008908)
# 18/ pluck 0.002750 0.000088 0.002838 ( 0.009101)
# 19/ pluck 0.002625 0.000122 0.002747 ( 0.008828)
# 20/ pluck 0.003288 0.000099 0.003387 ( 0.008490)
# 21/ pluck 0.002857 0.000072 0.002929 ( 0.004406)
# 22/ pluck 0.002939 0.000078 0.003017 ( 0.007681)
# 23/ pluck 0.002997 0.000067 0.003064 ( 0.004679)
# 24/ pluck 0.002752 0.000053 0.002805 ( 0.004333)
# 25/ pluck 0.002736 0.000053 0.002789 ( 0.004362)
# 26/ pluck 0.002857 0.000078 0.002935 ( 0.009372)
# 27/ pluck 0.003406 0.000046 0.003452 ( 0.004966)
# 28/ pluck 0.002902 0.000072 0.002974 ( 0.004476)
# 29/ pluck 0.002793 0.000050 0.002843 ( 0.004328)
# 30/ pluck 0.002740 0.000082 0.002822 ( 0.009068)
# 31/ pluck 0.002749 0.000047 0.002796 ( 0.004297)
# 32/ pluck 0.002748 0.000114 0.002862 ( 0.004472)
# 33/ pluck 0.002729 0.000064 0.002793 ( 0.004549)
# 34/ pluck 0.003469 0.000081 0.003550 ( 0.007357)
# 35/ pluck 0.002886 0.000040 0.002926 ( 0.004352)
# 36/ pluck 0.002777 0.000042 0.002819 ( 0.004300)
# 37/ pluck 0.002762 0.000085 0.002847 ( 0.004377)
# 38/ pluck 0.002858 0.000095 0.002953 ( 0.009402)
# 39/ pluck 0.002778 0.000078 0.002856 ( 0.008396)
# 40/ pluck 0.002683 0.000071 0.002754 ( 0.004666)
# 41/ pluck 0.003419 0.000101 0.003520 ( 0.005288)
# 42/ pluck 0.002972 0.000133 0.003105 ( 0.009714)
# 43/ pluck 0.002780 0.000104 0.002884 ( 0.004531)
# 44/ pluck 0.002699 0.000091 0.002790 ( 0.004464)
# 45/ pluck 0.002669 0.000127 0.002796 ( 0.004435)
# 46/ pluck 0.002757 0.000159 0.002916 ( 0.009728)
# 47/ pluck 0.002617 0.000078 0.002695 ( 0.004620)
# 48/ pluck 0.003249 0.000102 0.003351 ( 0.004815)
# 49/ pluck 0.003593 0.000127 0.003720 ( 0.005886)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment