Skip to content

Commit

Permalink
Add LICENSE file to sql-parser crate (#1959)
Browse files Browse the repository at this point in the history
Co-authored-by: Zeke Foppa <[email protected]>
  • Loading branch information
bfops and bfops authored Nov 7, 2024
1 parent adf6dab commit 789ac35
Showing 1 changed file with 0 additions and 0 deletions.
Empty file added crates/sql-parser/LICENSE
Empty file.

2 comments on commit 789ac35

@github-actions
Copy link

@github-actions github-actions bot commented on 789ac35 Nov 7, 2024

Choose a reason for hiding this comment

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

Criterion benchmark results

Criterion benchmark report

YOU SHOULD PROBABLY IGNORE THESE RESULTS.

Criterion is a wall time based benchmarking system that is extremely noisy when run on CI. We collect these results for longitudinal analysis, but they are not reliable for comparing individual PRs.

Go look at the callgrind report instead.

empty

db on disk new latency old latency new throughput old throughput
sqlite 💿 422.4±2.50ns 413.2±1.32ns - -
sqlite 🧠 417.4±2.17ns 408.4±1.45ns - -
stdb_raw 💿 776.7±0.98ns 774.6±3.68ns - -
stdb_raw 🧠 776.5±1.97ns 775.2±1.01ns - -

insert_1

db on disk schema indices preload new latency old latency new throughput old throughput

insert_bulk

db on disk schema indices preload count new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str btree_each_column 2048 256 594.5±1.27µs 589.2±0.86µs 1682 tx/sec 1697 tx/sec
sqlite 💿 u32_u64_str unique_0 2048 256 153.2±0.50µs 150.9±0.45µs 6.4 Ktx/sec 6.5 Ktx/sec
sqlite 💿 u32_u64_u64 btree_each_column 2048 256 474.0±0.58µs 479.6±28.08µs 2.1 Ktx/sec 2.0 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 2048 256 139.3±0.69µs 140.8±0.31µs 7.0 Ktx/sec 6.9 Ktx/sec
sqlite 🧠 u32_u64_str btree_each_column 2048 256 455.2±3.84µs 451.6±1.11µs 2.1 Ktx/sec 2.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 2048 256 125.0±0.55µs 127.9±0.96µs 7.8 Ktx/sec 7.6 Ktx/sec
sqlite 🧠 u32_u64_u64 btree_each_column 2048 256 373.2±0.69µs 370.4±0.47µs 2.6 Ktx/sec 2.6 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 2048 256 108.1±0.57µs 109.0±0.77µs 9.0 Ktx/sec 9.0 Ktx/sec
stdb_raw 💿 u32_u64_str btree_each_column 2048 256 593.0±18.06µs 597.0±14.18µs 1686 tx/sec 1675 tx/sec
stdb_raw 💿 u32_u64_str unique_0 2048 256 476.9±34.10µs 508.7±24.19µs 2.0 Ktx/sec 1965 tx/sec
stdb_raw 💿 u32_u64_u64 btree_each_column 2048 256 370.1±8.14µs 370.9±4.78µs 2.6 Ktx/sec 2.6 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 2048 256 335.8±19.47µs 346.8±13.80µs 2.9 Ktx/sec 2.8 Ktx/sec
stdb_raw 🧠 u32_u64_str btree_each_column 2048 256 294.9±0.33µs 295.5±0.35µs 3.3 Ktx/sec 3.3 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 2048 256 226.3±0.21µs 228.0±0.37µs 4.3 Ktx/sec 4.3 Ktx/sec
stdb_raw 🧠 u32_u64_u64 btree_each_column 2048 256 234.0±0.16µs 235.8±0.24µs 4.2 Ktx/sec 4.1 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 2048 256 208.1±0.14µs 210.5±0.31µs 4.7 Ktx/sec 4.6 Ktx/sec

iterate

db on disk schema indices new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str unique_0 23.9±0.28µs 23.9±0.12µs 40.9 Ktx/sec 40.8 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 21.7±0.06µs 21.8±0.10µs 45.0 Ktx/sec 44.8 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 21.3±0.08µs 21.1±0.14µs 45.9 Ktx/sec 46.2 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 19.2±0.05µs 19.1±0.09µs 50.8 Ktx/sec 51.0 Ktx/sec
stdb_raw 💿 u32_u64_str unique_0 4.0±0.00µs 4.9±0.00µs 245.8 Ktx/sec 199.7 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 3.9±0.00µs 4.8±0.00µs 252.3 Ktx/sec 203.9 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 4.0±0.01µs 4.9±0.00µs 246.6 Ktx/sec 199.9 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 3.9±0.01µs 4.8±0.00µs 253.4 Ktx/sec 203.9 Ktx/sec

find_unique

db on disk key type preload new latency old latency new throughput old throughput

filter

db on disk key type index strategy load count new latency old latency new throughput old throughput
sqlite 💿 string index 2048 256 68.3±0.07µs 69.4±0.27µs 14.3 Ktx/sec 14.1 Ktx/sec
sqlite 💿 u64 index 2048 256 65.5±0.31µs 66.5±0.21µs 14.9 Ktx/sec 14.7 Ktx/sec
sqlite 🧠 string index 2048 256 64.5±0.27µs 64.7±0.18µs 15.1 Ktx/sec 15.1 Ktx/sec
sqlite 🧠 u64 index 2048 256 59.5±0.28µs 59.5±0.18µs 16.4 Ktx/sec 16.4 Ktx/sec
stdb_raw 💿 string index 2048 256 5.0±0.00µs 5.1±0.00µs 195.5 Ktx/sec 192.7 Ktx/sec
stdb_raw 💿 u64 index 2048 256 4.9±0.00µs 5.0±0.00µs 198.5 Ktx/sec 195.5 Ktx/sec
stdb_raw 🧠 string index 2048 256 5.0±0.00µs 5.1±0.00µs 195.8 Ktx/sec 192.6 Ktx/sec
stdb_raw 🧠 u64 index 2048 256 4.9±0.00µs 5.0±0.00µs 198.6 Ktx/sec 195.6 Ktx/sec

serialize

schema format count new latency old latency new throughput old throughput
u32_u64_str bflatn_to_bsatn_fast_path 100 3.6±0.01µs 3.5±0.01µs 26.9 Mtx/sec 26.9 Mtx/sec
u32_u64_str bflatn_to_bsatn_slow_path 100 3.6±0.01µs 3.5±0.00µs 26.8 Mtx/sec 27.0 Mtx/sec
u32_u64_str bsatn 100 15.7±0.12ns 7.2±0.17ns 5.9 Gtx/sec 13.0 Gtx/sec
u32_u64_str bsatn 100 2.4±0.01µs 2.3±0.01µs 40.1 Mtx/sec 40.8 Mtx/sec
u32_u64_str json 100 5.1±0.05µs 5.4±0.03µs 18.7 Mtx/sec 17.8 Mtx/sec
u32_u64_str json 100 9.3±0.10µs 9.4±0.03µs 10.2 Mtx/sec 10.1 Mtx/sec
u32_u64_str product_value 100 1017.8±0.87ns 1020.2±0.75ns 93.7 Mtx/sec 93.5 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_fast_path 100 964.5±12.34ns 984.1±50.51ns 98.9 Mtx/sec 96.9 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_slow_path 100 2.8±0.00µs 2.8±0.00µs 34.3 Mtx/sec 34.3 Mtx/sec
u32_u64_u64 bsatn 100 14.8±0.01ns 6.7±0.06ns 6.3 Gtx/sec 13.8 Gtx/sec
u32_u64_u64 bsatn 100 1726.6±16.84ns 1768.5±11.49ns 55.2 Mtx/sec 53.9 Mtx/sec
u32_u64_u64 json 100 3.3±0.05µs 3.1±0.02µs 29.3 Mtx/sec 30.7 Mtx/sec
u32_u64_u64 json 100 5.9±0.01µs 5.9±0.03µs 16.1 Mtx/sec 16.0 Mtx/sec
u32_u64_u64 product_value 100 1017.8±0.80ns 1018.3±0.65ns 93.7 Mtx/sec 93.7 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_fast_path 100 750.9±1.52ns 751.6±3.36ns 127.0 Mtx/sec 126.9 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_slow_path 100 2.8±0.01µs 2.8±0.01µs 34.2 Mtx/sec 34.2 Mtx/sec
u64_u64_u32 bsatn 100 1776.5±37.82ns 1750.7±22.33ns 53.7 Mtx/sec 54.5 Mtx/sec
u64_u64_u32 bsatn 100 705.9±1.18ns 690.3±1.06ns 135.1 Mtx/sec 138.1 Mtx/sec
u64_u64_u32 json 100 3.3±0.10µs 3.2±0.05µs 29.2 Mtx/sec 30.1 Mtx/sec
u64_u64_u32 json 100 5.6±0.05µs 5.7±0.15µs 17.1 Mtx/sec 16.8 Mtx/sec
u64_u64_u32 product_value 100 1015.0±0.96ns 1015.4±0.69ns 94.0 Mtx/sec 93.9 Mtx/sec

stdb_module_large_arguments

arg size new latency old latency new throughput old throughput
64KiB 108.1±8.30µs 110.8±7.59µs - -

stdb_module_print_bulk

line count new latency old latency new throughput old throughput
1 45.1±6.70µs 44.9±6.79µs - -
100 599.2±5.14µs 596.3±12.21µs - -
1000 4.4±0.97ms 4.9±0.70ms - -

remaining

name new latency old latency new throughput old throughput
special/db_game/circles/load=10 44.1±10.14ms 44.6±3.93ms - -
special/db_game/circles/load=100 41.4±8.58ms 49.8±5.12ms - -
special/db_game/ia_loop/load=500 147.7±0.98ms 147.6±1.04ms - -
special/db_game/ia_loop/load=5000 5.3±0.04s 5.2±0.04s - -
sqlite/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 56.9±0.41µs 56.7±0.31µs 17.2 Ktx/sec 17.2 Ktx/sec
sqlite/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 47.6±0.35µs 48.6±0.33µs 20.5 Ktx/sec 20.1 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 42.4±0.27µs 40.9±0.12µs 23.0 Ktx/sec 23.9 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 36.7±0.28µs 36.1±0.15µs 26.6 Ktx/sec 27.0 Ktx/sec
stdb_module/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 1272.8±21.97µs 1261.4±11.70µs 785 tx/sec 792 tx/sec
stdb_module/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 995.1±6.64µs 989.7±8.66µs 1004 tx/sec 1010 tx/sec
stdb_raw/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 609.9±27.12µs 527.7±11.03µs 1639 tx/sec 1894 tx/sec
stdb_raw/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 473.8±7.49µs 479.5±9.38µs 2.1 Ktx/sec 2.0 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 360.2±0.39µs 362.8±0.55µs 2.7 Ktx/sec 2.7 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 318.8±0.43µs 323.7±0.33µs 3.1 Ktx/sec 3.0 Ktx/sec

@github-actions
Copy link

@github-actions github-actions bot commented on 789ac35 Nov 7, 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 6399 6399 0.00% 6491 6491 0.00%
sqlite 5579 5579 0.00% 6047 6047 0.00%

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 76593 76593 0.00% 77045 77033 0.02%
stdb_raw u32_u64_str no_index 64 128 2 string 119091 120180 -0.91% 119749 120854 -0.91%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25085 25083 0.01% 25519 25553 -0.13%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24051 24051 0.00% 24539 24535 0.02%
sqlite u32_u64_str no_index 64 128 2 string 144713 144695 0.01% 146185 146159 0.02%
sqlite u32_u64_str no_index 64 128 1 u64 124044 124056 -0.01% 125366 125382 -0.01%
sqlite u32_u64_str btree_each_column 64 128 1 u64 131379 131361 0.01% 132845 132835 0.01%
sqlite u32_u64_str btree_each_column 64 128 2 string 134494 134494 0.00% 136090 136082 0.01%

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 877380 877188 0.02% 928404 897404 3.45%
stdb_raw u32_u64_str btree_each_column 64 128 1029108 1026705 0.23% 1058900 1087009 -2.59%
sqlite u32_u64_str unique_0 64 128 398320 398320 0.00% 416166 416162 0.00%
sqlite u32_u64_str btree_each_column 64 128 983637 983637 0.00% 1024027 1024023 0.00%

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 153726 153726 0.00% 153834 153834 0.00%
stdb_raw u32_u64_str unique_0 64 16751 16751 0.00% 16843 16843 0.00%
sqlite u32_u64_str unique_0 1024 1067255 1067255 0.00% 1070643 1070643 0.00%
sqlite u32_u64_str unique_0 64 76201 76201 0.00% 77187 77187 0.00%

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% 50282 50282 0.00%
64 bsatn 25509 25509 0.00% 27719 27719 0.00%
16 bsatn 8200 8200 0.00% 9526 9526 0.00%
16 json 12188 12188 0.00% 14194 14194 0.00%

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 20262737 20073533 0.94% 20866711 20663205 0.98%
stdb_raw u32_u64_str unique_0 64 128 1284424 1283783 0.05% 1359164 1357743 0.10%
sqlite u32_u64_str unique_0 1024 1024 1802182 1802182 0.00% 1811416 1811420 -0.00%
sqlite u32_u64_str unique_0 64 128 128528 128528 0.00% 131350 131350 0.00%
On-disk benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 6404 6404 0.00% 6512 6512 0.00%
sqlite 5621 5621 0.00% 6157 6157 0.00%

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 76598 76598 0.00% 77034 77014 0.03%
stdb_raw u32_u64_str no_index 64 128 2 string 119096 119096 0.00% 119866 119742 0.10%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25090 25091 -0.00% 25556 25533 0.09%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24056 24056 0.00% 24492 24496 -0.02%
sqlite u32_u64_str no_index 64 128 1 u64 125983 125965 0.01% 127557 127531 0.02%
sqlite u32_u64_str no_index 64 128 2 string 146616 146616 0.00% 148352 148352 0.00%
sqlite u32_u64_str btree_each_column 64 128 2 string 136616 136616 0.00% 138618 138618 0.00%
sqlite u32_u64_str btree_each_column 64 128 1 u64 133457 133457 0.00% 135325 135325 0.00%

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 826060 826529 -0.06% 876274 876731 -0.05%
stdb_raw u32_u64_str btree_each_column 64 128 976448 975979 0.05% 1035612 1034941 0.06%
sqlite u32_u64_str unique_0 64 128 415857 415857 0.00% 433001 433013 -0.00%
sqlite u32_u64_str btree_each_column 64 128 1021898 1021898 0.00% 1062146 1062146 0.00%

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 153731 153731 0.00% 153819 153823 -0.00%
stdb_raw u32_u64_str unique_0 64 16756 16756 0.00% 16844 16844 0.00%
sqlite u32_u64_str unique_0 1024 1070323 1070323 0.00% 1074097 1074097 0.00%
sqlite u32_u64_str unique_0 64 77973 77973 0.00% 79267 79267 0.00%

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% 50282 50282 0.00%
64 bsatn 25509 25509 0.00% 27719 27719 0.00%
16 bsatn 8200 8200 0.00% 9526 9526 0.00%
16 json 12188 12188 0.00% 14194 14194 0.00%

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 18999459 18998637 0.00% 19705947 19707547 -0.01%
stdb_raw u32_u64_str unique_0 64 128 1237843 1238074 -0.02% 1313431 1313052 0.03%
sqlite u32_u64_str unique_0 1024 1024 1809743 1809743 0.00% 1818313 1818313 0.00%
sqlite u32_u64_str unique_0 64 128 132654 132654 0.00% 135620 135620 0.00%

Please sign in to comment.