Skip to content

Commit

Permalink
fix: Put query metrics behind feature flag (#784)
Browse files Browse the repository at this point in the history
A call site for record_query_duration_metrics was missed in #749.
  • Loading branch information
joshua-spacetime authored Feb 2, 2024
1 parent 3429ce6 commit 2c9ad21
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/core/src/subscription/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ impl QuerySet {
}
}
}
#[cfg(feature = "metrics")]
record_query_duration_metrics(WorkloadType::Update, &db.address(), start);
}
for (table_id, (table_name, ops)) in table_ops.into_iter().filter(|(_, (_, ops))| !ops.is_empty()) {
Expand Down

1 comment on commit 2c9ad21

@github-actions
Copy link

@github-actions github-actions bot commented on 2c9ad21 Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark results

Benchmark Report

Legend:

  • load: number of rows pre-loaded into the database
  • count: number of rows touched by the transaction
  • index types:
    • unique: a single index on the id column
    • non_unique: no indexes
    • multi_index: non-unique index on every column
  • schemas:
    • person(id: u32, name: String, age: u64)
    • location(id: u32, x: u64, y: u64)

All throughputs are single-threaded.

Empty transaction

db on disk new latency old latency new throughput old throughput
sqlite 💿 426.1±2.07ns 426.1±2.07ns - -
sqlite 🧠 416.4±1.09ns 416.4±1.09ns - -
stdb_module 💿 34.0±2.58µs 34.0±2.58µs - -
stdb_module 🧠 34.8±2.48µs 34.8±2.48µs - -
stdb_raw 💿 937.4±1.50ns 937.4±1.50ns - -
stdb_raw 🧠 883.1±3.71ns 883.1±3.71ns - -

Single-row insertions

db on disk schema index type load new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 14.4±0.04µs 14.4±0.04µs 67.6 Ktx/sec 67.6 Ktx/sec
sqlite 💿 location multi_index 1000 15.9±0.17µs 15.9±0.17µs 61.4 Ktx/sec 61.4 Ktx/sec
sqlite 💿 location non_unique 0 7.1±0.02µs 7.1±0.02µs 138.4 Ktx/sec 138.4 Ktx/sec
sqlite 💿 location non_unique 1000 7.0±0.12µs 7.0±0.12µs 139.4 Ktx/sec 139.4 Ktx/sec
sqlite 💿 location unique 0 7.0±0.39µs 7.0±0.39µs 138.9 Ktx/sec 138.9 Ktx/sec
sqlite 💿 location unique 1000 7.1±0.03µs 7.1±0.03µs 138.3 Ktx/sec 138.3 Ktx/sec
sqlite 💿 person multi_index 0 14.2±0.08µs 14.2±0.08µs 69.0 Ktx/sec 69.0 Ktx/sec
sqlite 💿 person multi_index 1000 16.1±0.11µs 16.1±0.11µs 60.5 Ktx/sec 60.5 Ktx/sec
sqlite 💿 person non_unique 0 7.3±0.57µs 7.3±0.57µs 134.3 Ktx/sec 134.3 Ktx/sec
sqlite 💿 person non_unique 1000 7.2±0.04µs 7.2±0.04µs 135.4 Ktx/sec 135.4 Ktx/sec
sqlite 💿 person unique 0 7.1±0.03µs 7.1±0.03µs 137.2 Ktx/sec 137.2 Ktx/sec
sqlite 💿 person unique 1000 7.2±0.05µs 7.2±0.05µs 135.3 Ktx/sec 135.3 Ktx/sec
sqlite 🧠 location multi_index 0 4.0±0.01µs 4.0±0.01µs 244.4 Ktx/sec 244.4 Ktx/sec
sqlite 🧠 location multi_index 1000 5.2±0.04µs 5.2±0.04µs 186.2 Ktx/sec 186.2 Ktx/sec
sqlite 🧠 location non_unique 0 1828.7±5.02ns 1828.7±5.02ns 534.0 Ktx/sec 534.0 Ktx/sec
sqlite 🧠 location non_unique 1000 1887.2±18.90ns 1887.2±18.90ns 517.5 Ktx/sec 517.5 Ktx/sec
sqlite 🧠 location unique 0 1821.0±3.65ns 1821.0±3.65ns 536.3 Ktx/sec 536.3 Ktx/sec
sqlite 🧠 location unique 1000 1912.9±9.07ns 1912.9±9.07ns 510.5 Ktx/sec 510.5 Ktx/sec
sqlite 🧠 person multi_index 0 3.7±0.01µs 3.7±0.01µs 266.8 Ktx/sec 266.8 Ktx/sec
sqlite 🧠 person multi_index 1000 5.4±0.03µs 5.4±0.03µs 179.7 Ktx/sec 179.7 Ktx/sec
sqlite 🧠 person non_unique 0 1895.4±6.74ns 1895.4±6.74ns 515.2 Ktx/sec 515.2 Ktx/sec
sqlite 🧠 person non_unique 1000 1985.2±10.17ns 1985.2±10.17ns 491.9 Ktx/sec 491.9 Ktx/sec
sqlite 🧠 person unique 0 1893.0±4.84ns 1893.0±4.84ns 515.9 Ktx/sec 515.9 Ktx/sec
sqlite 🧠 person unique 1000 2.1±0.01µs 2.1±0.01µs 476.1 Ktx/sec 476.1 Ktx/sec
stdb_module 💿 location multi_index 0 68.3±4.13µs 68.3±4.13µs 14.3 Ktx/sec 14.3 Ktx/sec
stdb_module 💿 location multi_index 1000 136.2±1.31µs 136.2±1.31µs 7.2 Ktx/sec 7.2 Ktx/sec
stdb_module 💿 location non_unique 0 69.9±3.97µs 69.9±3.97µs 14.0 Ktx/sec 14.0 Ktx/sec
stdb_module 💿 location non_unique 1000 184.4±7.20µs 184.4±7.20µs 5.3 Ktx/sec 5.3 Ktx/sec
stdb_module 💿 location unique 0 70.0±6.64µs 70.0±6.64µs 13.9 Ktx/sec 13.9 Ktx/sec
stdb_module 💿 location unique 1000 138.7±19.85µs 138.7±19.85µs 7.0 Ktx/sec 7.0 Ktx/sec
stdb_module 💿 person multi_index 0 79.8±11.90µs 79.8±11.90µs 12.2 Ktx/sec 12.2 Ktx/sec
stdb_module 💿 person multi_index 1000 214.4±6.17µs 214.4±6.17µs 4.6 Ktx/sec 4.6 Ktx/sec
stdb_module 💿 person non_unique 0 78.1±5.33µs 78.1±5.33µs 12.5 Ktx/sec 12.5 Ktx/sec
stdb_module 💿 person non_unique 1000 198.0±7.01µs 198.0±7.01µs 4.9 Ktx/sec 4.9 Ktx/sec
stdb_module 💿 person unique 0 78.6±5.95µs 78.6±5.95µs 12.4 Ktx/sec 12.4 Ktx/sec
stdb_module 💿 person unique 1000 272.3±708.21µs 272.3±708.21µs 3.6 Ktx/sec 3.6 Ktx/sec
stdb_module 🧠 location multi_index 0 52.5±6.40µs 52.5±6.40µs 18.6 Ktx/sec 18.6 Ktx/sec
stdb_module 🧠 location multi_index 1000 92.3±9.33µs 92.3±9.33µs 10.6 Ktx/sec 10.6 Ktx/sec
stdb_module 🧠 location non_unique 0 56.7±5.48µs 56.7±5.48µs 17.2 Ktx/sec 17.2 Ktx/sec
stdb_module 🧠 location non_unique 1000 124.9±2.34µs 124.9±2.34µs 7.8 Ktx/sec 7.8 Ktx/sec
stdb_module 🧠 location unique 0 52.4±4.92µs 52.4±4.92µs 18.6 Ktx/sec 18.6 Ktx/sec
stdb_module 🧠 location unique 1000 134.1±12.33µs 134.1±12.33µs 7.3 Ktx/sec 7.3 Ktx/sec
stdb_module 🧠 person multi_index 0 62.2±5.76µs 62.2±5.76µs 15.7 Ktx/sec 15.7 Ktx/sec
stdb_module 🧠 person multi_index 1000 231.2±8.77µs 231.2±8.77µs 4.2 Ktx/sec 4.2 Ktx/sec
stdb_module 🧠 person non_unique 0 50.2±4.97µs 50.2±4.97µs 19.5 Ktx/sec 19.5 Ktx/sec
stdb_module 🧠 person non_unique 1000 103.8±2.80µs 103.8±2.80µs 9.4 Ktx/sec 9.4 Ktx/sec
stdb_module 🧠 person unique 0 63.5±7.10µs 63.5±7.10µs 15.4 Ktx/sec 15.4 Ktx/sec
stdb_module 🧠 person unique 1000 140.3±8.21µs 140.3±8.21µs 7.0 Ktx/sec 7.0 Ktx/sec
stdb_raw 💿 location multi_index 0 6.0±0.24µs 6.0±0.24µs 162.8 Ktx/sec 162.8 Ktx/sec
stdb_raw 💿 location multi_index 1000 8.8±0.16µs 8.8±0.16µs 110.9 Ktx/sec 110.9 Ktx/sec
stdb_raw 💿 location non_unique 0 5.4±0.02µs 5.4±0.02µs 180.7 Ktx/sec 180.7 Ktx/sec
stdb_raw 💿 location non_unique 1000 14.9±76.33µs 14.9±76.33µs 65.6 Ktx/sec 65.6 Ktx/sec
stdb_raw 💿 location unique 0 5.9±0.05µs 5.9±0.05µs 165.7 Ktx/sec 165.7 Ktx/sec
stdb_raw 💿 location unique 1000 19.2±106.73µs 19.2±106.73µs 50.8 Ktx/sec 50.8 Ktx/sec
stdb_raw 💿 person multi_index 0 7.3±0.02µs 7.3±0.02µs 132.9 Ktx/sec 132.9 Ktx/sec
stdb_raw 💿 person multi_index 1000 10.4±0.14µs 10.4±0.14µs 94.3 Ktx/sec 94.3 Ktx/sec
stdb_raw 💿 person non_unique 0 6.7±0.03µs 6.7±0.03µs 144.8 Ktx/sec 144.8 Ktx/sec
stdb_raw 💿 person non_unique 1000 25.4±165.14µs 25.4±165.14µs 38.4 Ktx/sec 38.4 Ktx/sec
stdb_raw 💿 person unique 0 7.2±0.03µs 7.2±0.03µs 136.2 Ktx/sec 136.2 Ktx/sec
stdb_raw 💿 person unique 1000 31.1±210.47µs 31.1±210.47µs 31.4 Ktx/sec 31.4 Ktx/sec
stdb_raw 🧠 location multi_index 0 3.4±0.01µs 3.4±0.01µs 287.1 Ktx/sec 287.1 Ktx/sec
stdb_raw 🧠 location multi_index 1000 4.9±0.04µs 4.9±0.04µs 199.5 Ktx/sec 199.5 Ktx/sec
stdb_raw 🧠 location non_unique 0 2.8±0.01µs 2.8±0.01µs 345.7 Ktx/sec 345.7 Ktx/sec
stdb_raw 🧠 location non_unique 1000 3.5±0.02µs 3.5±0.02µs 281.5 Ktx/sec 281.5 Ktx/sec
stdb_raw 🧠 location unique 0 3.2±0.02µs 3.2±0.02µs 301.7 Ktx/sec 301.7 Ktx/sec
stdb_raw 🧠 location unique 1000 4.6±0.03µs 4.6±0.03µs 211.1 Ktx/sec 211.1 Ktx/sec
stdb_raw 🧠 person multi_index 0 4.1±0.01µs 4.1±0.01µs 239.1 Ktx/sec 239.1 Ktx/sec
stdb_raw 🧠 person multi_index 1000 5.9±0.04µs 5.9±0.04µs 165.4 Ktx/sec 165.4 Ktx/sec
stdb_raw 🧠 person non_unique 0 3.5±0.01µs 3.5±0.01µs 283.1 Ktx/sec 283.1 Ktx/sec
stdb_raw 🧠 person non_unique 1000 4.4±0.04µs 4.4±0.04µs 223.8 Ktx/sec 223.8 Ktx/sec
stdb_raw 🧠 person unique 0 3.9±0.01µs 3.9±0.01µs 249.5 Ktx/sec 249.5 Ktx/sec
stdb_raw 🧠 person unique 1000 5.4±0.05µs 5.4±0.05µs 181.2 Ktx/sec 181.2 Ktx/sec

Multi-row insertions

db on disk schema index type load count new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 100 130.9±3.87µs 130.9±3.87µs 7.5 Ktx/sec 7.5 Ktx/sec
sqlite 💿 location multi_index 1000 100 202.1±1.04µs 202.1±1.04µs 4.8 Ktx/sec 4.8 Ktx/sec
sqlite 💿 location non_unique 0 100 50.4±1.45µs 50.4±1.45µs 19.4 Ktx/sec 19.4 Ktx/sec
sqlite 💿 location non_unique 1000 100 53.4±0.52µs 53.4±0.52µs 18.3 Ktx/sec 18.3 Ktx/sec
sqlite 💿 location unique 0 100 52.1±1.34µs 52.1±1.34µs 18.8 Ktx/sec 18.8 Ktx/sec
sqlite 💿 location unique 1000 100 57.9±13.36µs 57.9±13.36µs 16.9 Ktx/sec 16.9 Ktx/sec
sqlite 💿 person multi_index 0 100 117.1±0.54µs 117.1±0.54µs 8.3 Ktx/sec 8.3 Ktx/sec
sqlite 💿 person multi_index 1000 100 227.9±0.46µs 227.9±0.46µs 4.3 Ktx/sec 4.3 Ktx/sec
sqlite 💿 person non_unique 0 100 47.6±1.51µs 47.6±1.51µs 20.5 Ktx/sec 20.5 Ktx/sec
sqlite 💿 person non_unique 1000 100 57.6±0.28µs 57.6±0.28µs 16.9 Ktx/sec 16.9 Ktx/sec
sqlite 💿 person unique 0 100 50.0±1.18µs 50.0±1.18µs 19.5 Ktx/sec 19.5 Ktx/sec
sqlite 💿 person unique 1000 100 54.3±0.35µs 54.3±0.35µs 18.0 Ktx/sec 18.0 Ktx/sec
sqlite 🧠 location multi_index 0 100 119.9±0.30µs 119.9±0.30µs 8.1 Ktx/sec 8.1 Ktx/sec
sqlite 🧠 location multi_index 1000 100 171.3±0.36µs 171.3±0.36µs 5.7 Ktx/sec 5.7 Ktx/sec
sqlite 🧠 location non_unique 0 100 44.3±0.27µs 44.3±0.27µs 22.1 Ktx/sec 22.1 Ktx/sec
sqlite 🧠 location non_unique 1000 100 43.9±0.26µs 43.9±0.26µs 22.3 Ktx/sec 22.3 Ktx/sec
sqlite 🧠 location unique 0 100 45.9±0.53µs 45.9±0.53µs 21.3 Ktx/sec 21.3 Ktx/sec
sqlite 🧠 location unique 1000 100 48.2±0.34µs 48.2±0.34µs 20.3 Ktx/sec 20.3 Ktx/sec
sqlite 🧠 person multi_index 0 100 106.3±0.32µs 106.3±0.32µs 9.2 Ktx/sec 9.2 Ktx/sec
sqlite 🧠 person multi_index 1000 100 190.2±0.45µs 190.2±0.45µs 5.1 Ktx/sec 5.1 Ktx/sec
sqlite 🧠 person non_unique 0 100 42.3±0.47µs 42.3±0.47µs 23.1 Ktx/sec 23.1 Ktx/sec
sqlite 🧠 person non_unique 1000 100 44.4±0.17µs 44.4±0.17µs 22.0 Ktx/sec 22.0 Ktx/sec
sqlite 🧠 person unique 0 100 43.5±0.30µs 43.5±0.30µs 22.4 Ktx/sec 22.4 Ktx/sec
sqlite 🧠 person unique 1000 100 46.8±0.22µs 46.8±0.22µs 20.8 Ktx/sec 20.8 Ktx/sec
stdb_module 💿 location multi_index 0 100 557.1±36.20µs 557.1±36.20µs 1795 tx/sec 1795 tx/sec
stdb_module 💿 location multi_index 1000 100 594.2±17.87µs 594.2±17.87µs 1682 tx/sec 1682 tx/sec
stdb_module 💿 location non_unique 0 100 499.2±9.72µs 499.2±9.72µs 2003 tx/sec 2003 tx/sec
stdb_module 💿 location non_unique 1000 100 396.2±62.93µs 396.2±62.93µs 2.5 Ktx/sec 2.5 Ktx/sec
stdb_module 💿 location unique 0 100 571.1±19.21µs 571.1±19.21µs 1751 tx/sec 1751 tx/sec
stdb_module 💿 location unique 1000 100 617.3±88.74µs 617.3±88.74µs 1620 tx/sec 1620 tx/sec
stdb_module 💿 person multi_index 0 100 802.8±64.71µs 802.8±64.71µs 1245 tx/sec 1245 tx/sec
stdb_module 💿 person multi_index 1000 100 961.1±74.93µs 961.1±74.93µs 1040 tx/sec 1040 tx/sec
stdb_module 💿 person non_unique 0 100 723.0±60.91µs 723.0±60.91µs 1383 tx/sec 1383 tx/sec
stdb_module 💿 person non_unique 1000 100 780.9±69.22µs 780.9±69.22µs 1280 tx/sec 1280 tx/sec
stdb_module 💿 person unique 0 100 782.2±84.13µs 782.2±84.13µs 1278 tx/sec 1278 tx/sec
stdb_module 💿 person unique 1000 100 1023.3±2126.20µs 1023.3±2126.20µs 977 tx/sec 977 tx/sec
stdb_module 🧠 location multi_index 0 100 548.9±8.60µs 548.9±8.60µs 1821 tx/sec 1821 tx/sec
stdb_module 🧠 location multi_index 1000 100 528.7±49.48µs 528.7±49.48µs 1891 tx/sec 1891 tx/sec
stdb_module 🧠 location non_unique 0 100 344.8±27.94µs 344.8±27.94µs 2.8 Ktx/sec 2.8 Ktx/sec
stdb_module 🧠 location non_unique 1000 100 412.9±17.98µs 412.9±17.98µs 2.4 Ktx/sec 2.4 Ktx/sec
stdb_module 🧠 location unique 0 100 465.5±17.24µs 465.5±17.24µs 2.1 Ktx/sec 2.1 Ktx/sec
stdb_module 🧠 location unique 1000 100 326.6±6.09µs 326.6±6.09µs 3.0 Ktx/sec 3.0 Ktx/sec
stdb_module 🧠 person multi_index 0 100 666.7±33.00µs 666.7±33.00µs 1499 tx/sec 1499 tx/sec
stdb_module 🧠 person multi_index 1000 100 725.2±32.29µs 725.2±32.29µs 1378 tx/sec 1378 tx/sec
stdb_module 🧠 person non_unique 0 100 502.0±43.96µs 502.0±43.96µs 1992 tx/sec 1992 tx/sec
stdb_module 🧠 person non_unique 1000 100 557.0±6.55µs 557.0±6.55µs 1795 tx/sec 1795 tx/sec
stdb_module 🧠 person unique 0 100 651.4±12.72µs 651.4±12.72µs 1535 tx/sec 1535 tx/sec
stdb_module 🧠 person unique 1000 100 769.8±4.35µs 769.8±4.35µs 1299 tx/sec 1299 tx/sec
stdb_raw 💿 location multi_index 0 100 196.6±0.38µs 196.6±0.38µs 5.0 Ktx/sec 5.0 Ktx/sec
stdb_raw 💿 location multi_index 1000 100 219.4±126.98µs 219.4±126.98µs 4.5 Ktx/sec 4.5 Ktx/sec
stdb_raw 💿 location non_unique 0 100 126.3±0.27µs 126.3±0.27µs 7.7 Ktx/sec 7.7 Ktx/sec
stdb_raw 💿 location non_unique 1000 100 127.5±0.97µs 127.5±0.97µs 7.7 Ktx/sec 7.7 Ktx/sec
stdb_raw 💿 location unique 0 100 185.6±4.79µs 185.6±4.79µs 5.3 Ktx/sec 5.3 Ktx/sec
stdb_raw 💿 location unique 1000 100 196.4±1.03µs 196.4±1.03µs 5.0 Ktx/sec 5.0 Ktx/sec
stdb_raw 💿 person multi_index 0 100 305.6±6.79µs 305.6±6.79µs 3.2 Ktx/sec 3.2 Ktx/sec
stdb_raw 💿 person multi_index 1000 100 334.0±190.80µs 334.0±190.80µs 2.9 Ktx/sec 2.9 Ktx/sec
stdb_raw 💿 person non_unique 0 100 218.9±21.42µs 218.9±21.42µs 4.5 Ktx/sec 4.5 Ktx/sec
stdb_raw 💿 person non_unique 1000 100 218.2±0.36µs 218.2±0.36µs 4.5 Ktx/sec 4.5 Ktx/sec
stdb_raw 💿 person unique 0 100 279.5±0.60µs 279.5±0.60µs 3.5 Ktx/sec 3.5 Ktx/sec
stdb_raw 💿 person unique 1000 100 316.9±288.79µs 316.9±288.79µs 3.1 Ktx/sec 3.1 Ktx/sec
stdb_raw 🧠 location multi_index 0 100 149.3±0.20µs 149.3±0.20µs 6.5 Ktx/sec 6.5 Ktx/sec
stdb_raw 🧠 location multi_index 1000 100 159.0±0.25µs 159.0±0.25µs 6.1 Ktx/sec 6.1 Ktx/sec
stdb_raw 🧠 location non_unique 0 100 79.7±0.11µs 79.7±0.11µs 12.3 Ktx/sec 12.3 Ktx/sec
stdb_raw 🧠 location non_unique 1000 100 81.1±0.15µs 81.1±0.15µs 12.0 Ktx/sec 12.0 Ktx/sec
stdb_raw 🧠 location unique 0 100 138.6±0.33µs 138.6±0.33µs 7.0 Ktx/sec 7.0 Ktx/sec
stdb_raw 🧠 location unique 1000 100 148.6±0.48µs 148.6±0.48µs 6.6 Ktx/sec 6.6 Ktx/sec
stdb_raw 🧠 person multi_index 0 100 208.2±0.26µs 208.2±0.26µs 4.7 Ktx/sec 4.7 Ktx/sec
stdb_raw 🧠 person multi_index 1000 100 218.0±0.29µs 218.0±0.29µs 4.5 Ktx/sec 4.5 Ktx/sec
stdb_raw 🧠 person non_unique 0 100 122.6±0.15µs 122.6±0.15µs 8.0 Ktx/sec 8.0 Ktx/sec
stdb_raw 🧠 person non_unique 1000 100 123.7±0.18µs 123.7±0.18µs 7.9 Ktx/sec 7.9 Ktx/sec
stdb_raw 🧠 person unique 0 100 184.7±0.51µs 184.7±0.51µs 5.3 Ktx/sec 5.3 Ktx/sec
stdb_raw 🧠 person unique 1000 100 194.0±0.40µs 194.0±0.40µs 5.0 Ktx/sec 5.0 Ktx/sec

Full table iterate

db on disk schema index type new latency old latency new throughput old throughput
sqlite 💿 location unique 9.0±0.12µs 9.0±0.12µs 108.4 Ktx/sec 108.4 Ktx/sec
sqlite 💿 person unique 9.3±0.15µs 9.3±0.15µs 105.5 Ktx/sec 105.5 Ktx/sec
sqlite 🧠 location unique 7.8±0.16µs 7.8±0.16µs 125.7 Ktx/sec 125.7 Ktx/sec
sqlite 🧠 person unique 8.1±0.15µs 8.1±0.15µs 119.8 Ktx/sec 119.8 Ktx/sec
stdb_module 💿 location unique 65.5±9.89µs 65.5±9.89µs 14.9 Ktx/sec 14.9 Ktx/sec
stdb_module 💿 person unique 79.0±11.54µs 79.0±11.54µs 12.4 Ktx/sec 12.4 Ktx/sec
stdb_module 🧠 location unique 60.8±4.90µs 60.8±4.90µs 16.1 Ktx/sec 16.1 Ktx/sec
stdb_module 🧠 person unique 75.7±8.04µs 75.7±8.04µs 12.9 Ktx/sec 12.9 Ktx/sec
stdb_raw 💿 location unique 12.5±0.20µs 12.5±0.20µs 78.2 Ktx/sec 78.2 Ktx/sec
stdb_raw 💿 person unique 13.6±0.15µs 13.6±0.15µs 71.6 Ktx/sec 71.6 Ktx/sec
stdb_raw 🧠 location unique 12.4±0.01µs 12.4±0.01µs 78.8 Ktx/sec 78.8 Ktx/sec
stdb_raw 🧠 person unique 13.5±0.00µs 13.5±0.00µs 72.2 Ktx/sec 72.2 Ktx/sec

Find unique key

db on disk key type load new latency old latency new throughput old throughput
sqlite 💿 u32 1000 2.3±0.00µs 2.3±0.00µs 418.8 Ktx/sec 418.8 Ktx/sec
sqlite 🧠 u32 1000 1136.5±3.53ns 1136.5±3.53ns 859.2 Ktx/sec 859.2 Ktx/sec
stdb_module 💿 u32 1000 40.1±2.84µs 40.1±2.84µs 24.4 Ktx/sec 24.4 Ktx/sec
stdb_module 🧠 u32 1000 39.7±3.11µs 39.7±3.11µs 24.6 Ktx/sec 24.6 Ktx/sec
stdb_raw 💿 u32 1000 1877.3±3.28ns 1877.3±3.28ns 520.2 Ktx/sec 520.2 Ktx/sec
stdb_raw 🧠 u32 1000 1802.3±4.33ns 1802.3±4.33ns 541.8 Ktx/sec 541.8 Ktx/sec

Filter

db on disk key type index strategy load count new latency old latency new throughput old throughput
sqlite 💿 string indexed 1000 10 5.6±0.02µs 5.6±0.02µs 172.9 Ktx/sec 172.9 Ktx/sec
sqlite 💿 string non_indexed 1000 10 50.8±0.55µs 50.8±0.55µs 19.2 Ktx/sec 19.2 Ktx/sec
sqlite 💿 u64 indexed 1000 10 5.4±0.02µs 5.4±0.02µs 179.3 Ktx/sec 179.3 Ktx/sec
sqlite 💿 u64 non_indexed 1000 10 33.0±0.07µs 33.0±0.07µs 29.6 Ktx/sec 29.6 Ktx/sec
sqlite 🧠 string indexed 1000 10 4.3±0.02µs 4.3±0.02µs 229.1 Ktx/sec 229.1 Ktx/sec
sqlite 🧠 string non_indexed 1000 10 48.0±0.40µs 48.0±0.40µs 20.4 Ktx/sec 20.4 Ktx/sec
sqlite 🧠 u64 indexed 1000 10 4.1±0.01µs 4.1±0.01µs 240.6 Ktx/sec 240.6 Ktx/sec
sqlite 🧠 u64 non_indexed 1000 10 31.8±0.12µs 31.8±0.12µs 30.7 Ktx/sec 30.7 Ktx/sec
stdb_module 💿 string indexed 1000 10 46.6±3.84µs 46.6±3.84µs 21.0 Ktx/sec 21.0 Ktx/sec
stdb_module 💿 string non_indexed 1000 10 246.0±6.72µs 246.0±6.72µs 4.0 Ktx/sec 4.0 Ktx/sec
stdb_module 💿 u64 indexed 1000 10 48.5±3.81µs 48.5±3.81µs 20.1 Ktx/sec 20.1 Ktx/sec
stdb_module 💿 u64 non_indexed 1000 10 211.9±6.09µs 211.9±6.09µs 4.6 Ktx/sec 4.6 Ktx/sec
stdb_module 🧠 string indexed 1000 10 38.9±3.99µs 38.9±3.99µs 25.1 Ktx/sec 25.1 Ktx/sec
stdb_module 🧠 string non_indexed 1000 10 242.8±4.60µs 242.8±4.60µs 4.0 Ktx/sec 4.0 Ktx/sec
stdb_module 🧠 u64 indexed 1000 10 45.1±3.81µs 45.1±3.81µs 21.6 Ktx/sec 21.6 Ktx/sec
stdb_module 🧠 u64 non_indexed 1000 10 199.5±0.66µs 199.5±0.66µs 4.9 Ktx/sec 4.9 Ktx/sec
stdb_raw 💿 string indexed 1000 10 2.7±0.00µs 2.7±0.00µs 364.5 Ktx/sec 364.5 Ktx/sec
stdb_raw 💿 string non_indexed 1000 10 200.5±0.74µs 200.5±0.74µs 4.9 Ktx/sec 4.9 Ktx/sec
stdb_raw 💿 u64 indexed 1000 10 2.6±0.02µs 2.6±0.02µs 370.8 Ktx/sec 370.8 Ktx/sec
stdb_raw 💿 u64 non_indexed 1000 10 176.2±0.24µs 176.2±0.24µs 5.5 Ktx/sec 5.5 Ktx/sec
stdb_raw 🧠 string indexed 1000 10 2.6±0.00µs 2.6±0.00µs 373.2 Ktx/sec 373.2 Ktx/sec
stdb_raw 🧠 string non_indexed 1000 10 200.0±0.47µs 200.0±0.47µs 4.9 Ktx/sec 4.9 Ktx/sec
stdb_raw 🧠 u64 indexed 1000 10 2.6±0.00µs 2.6±0.00µs 382.7 Ktx/sec 382.7 Ktx/sec
stdb_raw 🧠 u64 non_indexed 1000 10 176.0±0.27µs 176.0±0.27µs 5.5 Ktx/sec 5.5 Ktx/sec

Serialize

schema format count new latency old latency new throughput old throughput
location bsatn 100 1669.1±29.56ns 1669.1±29.56ns 57.1 Mtx/sec 57.1 Mtx/sec
location json 100 3.3±0.04µs 3.3±0.04µs 28.6 Mtx/sec 28.6 Mtx/sec
location product_value 100 560.8±0.40ns 560.8±0.40ns 170.1 Mtx/sec 170.1 Mtx/sec
person bsatn 100 3.0±0.01µs 3.0±0.01µs 31.4 Mtx/sec 31.4 Mtx/sec
person json 100 4.9±0.04µs 4.9±0.04µs 19.3 Mtx/sec 19.3 Mtx/sec
person product_value 100 667.9±15.49ns 667.9±15.49ns 142.8 Mtx/sec 142.8 Mtx/sec

Module: invoke with large arguments

arg size new latency old latency new throughput old throughput
64KiB 73.7±7.81µs 73.7±7.81µs - -

Module: print bulk

line count new latency old latency new throughput old throughput
1 40.4±2.24µs 40.4±2.24µs - -
100 239.7±42.12µs 239.7±42.12µs - -
1000 1888.3±18.05µs 1888.3±18.05µs - -

Remaining benchmarks

name new latency old latency new throughput old throughput

Please sign in to comment.