Skip to content

Instantly share code, notes, and snippets.

@headius
Created May 13, 2022 19:59
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 headius/2431c86dfd80aa4915d0471524427779 to your computer and use it in GitHub Desktop.
Save headius/2431c86dfd80aa4915d0471524427779 to your computer and use it in GitHub Desktop.
[] ~/projects/activerecord-jdbc-adapter $ AR_VERSION="~>7.0" AR_ADAPTER=sqlite3 ruby -I jdbc-sqlite3/lib bench/benchmark_update.rb 5000
--- RUBY_VERSION: 3.1.0 (JRUBY_VERSION: 9.4.0.0-SNAPSHOT 17.0.3+7)
--- ActiveRecord: 7.0.3 (AR-JDBC: 70.0 c9b5699b)
- BenchRecord.connection.create_table(:bench_records) { ... } took 0.025415
Rehearsal ---------------------------------------------------------------------------------------------------------------------------------
BenchRecord#update() [5000x] 5.310000 0.020000 5.330000 ( 1.562108)
BenchRecord#update('a_binary' => "\x05w\xAF\x12DS\xCF\xFA\x9FiqPv\x00(\xD8...(1536)") [5000x] 10.170000 4.510000 14.680000 ( 37.622093)
BenchRecord#update('a_boolean' => true) [5000x] 6.580000 4.500000 11.080000 ( 36.015830)
BenchRecord#update('a_date' => Fri, 13 May 2022) [5000x] 8.790000 6.960000 15.750000 ( 42.103111)
BenchRecord#update('a_datetime' => Fri, 13 May 2022 14:58:56 -0400) [5000x] 10.820000 7.890000 18.710000 ( 44.806279)
BenchRecord#update('a_decimal' => 0.123456789055555e10) [5000x] 8.090000 6.050000 14.140000 ( 40.279163)
BenchRecord#update('a_float' => 999.99) [5000x] 4.770000 3.700000 8.470000 ( 33.967554)
BenchRecord#update('a_integer' => 4242) [5000x] 9.960000 8.830000 18.790000 ( 46.198743)
BenchRecord#update('a_string' => "BORAT Ipsum!") [5000x] 10.160000 8.800000 18.960000 ( 46.305939)
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [5000x] 12.690000 12.190000 24.880000 ( 53.913135)
BenchRecord#update('a_time' => 2022-05-13 14:58:56.522501 -0400) [5000x] 9.610000 8.050000 17.660000 ( 48.872984)
BenchRecord#update('a_timestamp' => 2022-05-13 14:58:56.522702 -0400) [5000x] 13.020000 11.150000 24.170000 ( 51.455584)
BenchRecord#update(...) [5000x] 3.810000 0.030000 3.840000 ( 1.861166)
---------------------------------------------------------------------------------------------------------------------- total: 196.460000sec
user system total real
BenchRecord#update() [5000x] 0.870000 0.020000 0.890000 ( 0.732238)
BenchRecord#update('a_binary' => "\x05w\xAF\x12DS\xCF\xFA\x9FiqPv\x00(\xD8...(1536)") [5000x] 0.870000 0.030000 0.900000 ( 0.841332)
BenchRecord#update('a_boolean' => true) [5000x] 0.940000 0.000000 0.940000 ( 0.826478)
BenchRecord#update('a_date' => Fri, 13 May 2022) [5000x] 0.900000 0.030000 0.930000 ( 0.889809)
BenchRecord#update('a_datetime' => Fri, 13 May 2022 14:58:56 -0400) [5000x] 1.020000 0.000000 1.020000 ( 0.927044)
BenchRecord#update('a_decimal' => 0.123456789055555e10) [5000x] 0.930000 0.010000 0.940000 ( 0.889845)
BenchRecord#update('a_float' => 999.99) [5000x] 1.240000 0.010000 1.250000 ( 0.906112)
BenchRecord#update('a_integer' => 4242) [5000x] 0.900000 0.000000 0.900000 ( 0.850725)
BenchRecord#update('a_string' => "BORAT Ipsum!") [5000x] 0.880000 0.000000 0.880000 ( 0.833453)
BenchRecord#update('a_text' => "Kazakhstan is th...(464)") [5000x] 0.890000 0.000000 0.890000 ( 0.835448)
BenchRecord#update('a_time' => 2022-05-13 14:58:56.522501 -0400) [5000x] 0.900000 0.000000 0.900000 ( 0.850904)
BenchRecord#update('a_timestamp' => 2022-05-13 14:58:56.522702 -0400) [5000x] 0.870000 0.010000 0.880000 ( 0.830675)
BenchRecord#update(...) [5000x] 1.570000 0.000000 1.570000 ( 1.492390)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment