Skip to content

Commit

Permalink
Use new token format when generating new id tokens (#1854)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdt authored Oct 19, 2024
1 parent 209d12c commit 94eef52
Show file tree
Hide file tree
Showing 6 changed files with 399 additions and 135 deletions.
Loading

2 comments on commit 94eef52

@github-actions
Copy link

@github-actions github-actions bot commented on 94eef52 Oct 19, 2024

Choose a reason for hiding this comment

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

Benchmarking failed. Please check the workflow run for details.

@github-actions
Copy link

@github-actions github-actions bot commented on 94eef52 Oct 19, 2024

Choose a reason for hiding this comment

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

Callgrind benchmark results

Callgrind Benchmark Report

These benchmarks were run using callgrind,
an instruction-level profiler. They allow comparisons between sqlite (sqlite), SpacetimeDB running through a module (stdb_module), and the underlying SpacetimeDB data storage engine (stdb_raw). Callgrind emulates a CPU to collect the below estimates.

Measurement changes larger than five percent are in bold.

In-memory benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 5392 5392 0.00% 5500 5430 1.29%
sqlite 5579 5579 0.00% 5963 5967 -0.07%

callgrind: filter

db schema indices count preload _column data_type total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str no_index 64 128 1 u64 75558 75558 0.00% 76064 75896 0.22%
stdb_raw u32_u64_str no_index 64 128 2 string 117800 118056 -0.22% 118404 118552 -0.12%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 24123 24082 0.17% 24667 24486 0.74%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 23075 23050 0.11% 23481 23356 0.54%
sqlite u32_u64_str no_index 64 128 2 string 144695 144695 0.00% 146087 146113 -0.02%
sqlite u32_u64_str no_index 64 128 1 u64 124044 124044 0.00% 125194 125252 -0.05%
sqlite u32_u64_str btree_each_column 64 128 1 u64 131361 131361 0.00% 132815 132753 0.05%
sqlite u32_u64_str btree_each_column 64 128 2 string 134494 134494 0.00% 136166 136072 0.07%

callgrind: insert bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 64 128 900245 900638 -0.04% 948495 920762 3.01%
stdb_raw u32_u64_str btree_each_column 64 128 1049084 1053903 -0.46% 1103730 1115337 -1.04%
sqlite u32_u64_str unique_0 64 128 398344 398320 0.01% 417300 413142 1.01%
sqlite u32_u64_str btree_each_column 64 128 983637 983637 0.00% 1020269 1018503 0.17%

callgrind: iterate

db schema indices count total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 152784 152784 0.00% 152894 152862 0.02%
stdb_raw u32_u64_str unique_0 64 15809 15809 0.00% 15911 15879 0.20%
sqlite u32_u64_str unique_0 1024 1067255 1067255 0.00% 1070565 1070563 0.00%
sqlite u32_u64_str unique_0 64 76201 76201 0.00% 77249 77259 -0.01%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47528 47528 0.00% 50150 50180 -0.06%
64 bsatn 25509 25509 0.00% 27685 27685 0.00%
16 bsatn 8200 8200 0.00% 9492 9492 0.00%
16 json 12188 12188 0.00% 14024 14092 -0.48%

callgrind: update bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 1024 20565104 20704502 -0.67% 20961460 21503972 -2.52%
stdb_raw u32_u64_str unique_0 64 128 1312145 1308896 0.25% 1343295 1395016 -3.71%
sqlite u32_u64_str unique_0 1024 1024 1802128 1802128 0.00% 1811580 1811108 0.03%
sqlite u32_u64_str unique_0 64 128 128474 128474 0.00% 131368 131220 0.11%
On-disk benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 5397 5397 0.00% 5505 5439 1.21%
sqlite 5621 5621 0.00% 6057 6105 -0.79%

callgrind: filter

db schema indices count preload _column data_type total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str no_index 64 128 1 u64 75563 75563 0.00% 76061 75893 0.22%
stdb_raw u32_u64_str no_index 64 128 2 string 117805 119150 -1.13% 118417 119642 -1.02%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 24112 24087 0.10% 24664 24511 0.62%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 23080 23055 0.11% 23490 23357 0.57%
sqlite u32_u64_str no_index 64 128 1 u64 125965 125965 0.00% 127419 127521 -0.08%
sqlite u32_u64_str no_index 64 128 2 string 146616 146616 0.00% 148276 148362 -0.06%
sqlite u32_u64_str btree_each_column 64 128 2 string 136616 136616 0.00% 138618 138664 -0.03%
sqlite u32_u64_str btree_each_column 64 128 1 u64 133457 133457 0.00% 135327 135253 0.05%

callgrind: insert bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 64 128 849349 851335 -0.23% 896327 901379 -0.56%
stdb_raw u32_u64_str btree_each_column 64 128 999699 999599 0.01% 1052753 1060041 -0.69%
sqlite u32_u64_str unique_0 64 128 415857 415857 0.00% 434111 429869 0.99%
sqlite u32_u64_str btree_each_column 64 128 1021904 1021904 0.00% 1057182 1055484 0.16%

callgrind: iterate

db schema indices count total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 152789 152789 0.00% 152891 152859 0.02%
stdb_raw u32_u64_str unique_0 64 15814 15814 0.00% 15916 15884 0.20%
sqlite u32_u64_str unique_0 1024 1070323 1070323 0.00% 1074079 1074105 -0.00%
sqlite u32_u64_str unique_0 64 77973 77973 0.00% 79233 79247 -0.02%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47528 47528 0.00% 50150 50180 -0.06%
64 bsatn 25509 25509 0.00% 27685 27685 0.00%
16 bsatn 8200 8200 0.00% 9492 9492 0.00%
16 json 12188 12188 0.00% 14024 14092 -0.48%

callgrind: update bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 1024 19486152 19444399 0.21% 19973162 20318759 -1.70%
stdb_raw u32_u64_str unique_0 64 128 1264828 1262469 0.19% 1325812 1348485 -1.68%
sqlite u32_u64_str unique_0 1024 1024 1809689 1809689 0.00% 1818375 1818351 0.00%
sqlite u32_u64_str unique_0 64 128 132600 132600 0.00% 135646 135506 0.10%

Please sign in to comment.