Skip to content

Commit

Permalink
Add PR status check that fails unless based on master (#1180)
Browse files Browse the repository at this point in the history
* [bfops/block-pr-chain]: empty

* [bfops/block-pr-chain]: workflow

* [bfops/block-pr-chain]: fix

* [bfops/block-pr-chain]: update

* [bfops/block-pr-chain]: update

---------

Co-authored-by: Zeke Foppa <github.com/bfops>
  • Loading branch information
bfops authored May 1, 2024
1 parent e526c8c commit 6810821
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/check-pr-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Git tree checks

on:
pull_request:
types: [opened, edited]
merge_group:
permissions: read-all

jobs:
check_base_ref:
name: Based on `master`
runs-on: ubuntu-latest
steps:
- id: not_based_on_master
if: |
github.event.pull_request.base.ref != 'master'
run: |
echo "This PR is not based on master. Please wait until the base PR merges."
exit 1

2 comments on commit 6810821

@github-actions
Copy link

@github-actions github-actions bot commented on 6810821 May 1, 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 💿 418.0±1.70ns 421.2±1.64ns - -
sqlite 🧠 415.1±1.67ns 415.4±1.28ns - -
stdb_raw 💿 721.5±2.43ns 719.7±2.59ns - -
stdb_raw 🧠 692.5±0.68ns 691.1±2.82ns - -

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 521.3±42.57µs 507.3±1.06µs 1918 tx/sec 1971 tx/sec
sqlite 💿 u32_u64_str unique_0 2048 256 133.1±0.54µs 134.6±1.23µs 7.3 Ktx/sec 7.3 Ktx/sec
sqlite 💿 u32_u64_u64 btree_each_column 2048 256 417.5±0.59µs 416.3±0.34µs 2.3 Ktx/sec 2.3 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 2048 256 120.9±0.71µs 124.3±0.30µs 8.1 Ktx/sec 7.9 Ktx/sec
sqlite 🧠 u32_u64_str btree_each_column 2048 256 442.6±0.30µs 439.9±0.69µs 2.2 Ktx/sec 2.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 2048 256 119.1±0.44µs 120.7±0.57µs 8.2 Ktx/sec 8.1 Ktx/sec
sqlite 🧠 u32_u64_u64 btree_each_column 2048 256 363.1±0.75µs 362.9±0.25µs 2.7 Ktx/sec 2.7 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 2048 256 104.1±0.51µs 106.3±0.53µs 9.4 Ktx/sec 9.2 Ktx/sec
stdb_raw 💿 u32_u64_str btree_each_column 2048 256 591.1±20.25µs 498.8±12.28µs 1691 tx/sec 2004 tx/sec
stdb_raw 💿 u32_u64_str unique_0 2048 256 495.1±33.10µs 484.3±21.13µs 2019 tx/sec 2.0 Ktx/sec
stdb_raw 💿 u32_u64_u64 btree_each_column 2048 256 392.4±8.57µs 381.9±6.24µs 2.5 Ktx/sec 2.6 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 2048 256 315.5±17.77µs 352.3±16.71µs 3.1 Ktx/sec 2.8 Ktx/sec
stdb_raw 🧠 u32_u64_str btree_each_column 2048 256 324.9±0.22µs 328.6±0.27µs 3.0 Ktx/sec 3.0 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 2048 256 252.9±0.21µs 258.7±0.69µs 3.9 Ktx/sec 3.8 Ktx/sec
stdb_raw 🧠 u32_u64_u64 btree_each_column 2048 256 263.3±0.19µs 263.5±1.12µs 3.7 Ktx/sec 3.7 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 2048 256 231.4±0.28µs 231.2±1.33µs 4.2 Ktx/sec 4.2 Ktx/sec

iterate

db on disk schema indices new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str unique_0 20.3±0.07µs 20.4±0.07µs 48.0 Ktx/sec 47.9 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 19.2±0.20µs 19.2±0.07µs 50.8 Ktx/sec 50.8 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 19.6±0.36µs 19.2±0.16µs 49.9 Ktx/sec 50.9 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 18.1±0.24µs 18.1±0.08µs 53.8 Ktx/sec 54.1 Ktx/sec
stdb_raw 💿 u32_u64_str unique_0 4.7±0.00µs 3.7±0.00µs 208.1 Ktx/sec 264.0 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 4.6±0.00µs 3.6±0.00µs 213.8 Ktx/sec 272.8 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 4.7±0.00µs 3.7±0.00µs 209.1 Ktx/sec 264.7 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 4.5±0.00µs 3.6±0.00µs 214.8 Ktx/sec 274.7 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 70.2±0.18µs 68.5±0.23µs 13.9 Ktx/sec 14.3 Ktx/sec
sqlite 💿 u64 index 2048 256 66.5±0.27µs 66.0±0.19µs 14.7 Ktx/sec 14.8 Ktx/sec
sqlite 🧠 string index 2048 256 68.9±0.16µs 65.6±0.15µs 14.2 Ktx/sec 14.9 Ktx/sec
sqlite 🧠 u64 index 2048 256 63.7±0.44µs 60.4±0.10µs 15.3 Ktx/sec 16.2 Ktx/sec
stdb_raw 💿 string index 2048 256 5.1±0.00µs 5.1±0.00µs 192.0 Ktx/sec 190.0 Ktx/sec
stdb_raw 💿 u64 index 2048 256 5.1±0.00µs 5.1±0.00µs 190.0 Ktx/sec 189.7 Ktx/sec
stdb_raw 🧠 string index 2048 256 5.1±0.00µs 5.1±0.00µs 193.3 Ktx/sec 191.2 Ktx/sec
stdb_raw 🧠 u64 index 2048 256 5.1±0.00µs 5.1±0.00µs 191.2 Ktx/sec 190.3 Ktx/sec

serialize

schema format count new latency old latency new throughput old throughput
u32_u64_str bflatn_to_bsatn_fast_path 100 3.4±0.00µs 3.4±0.01µs 28.1 Mtx/sec 28.1 Mtx/sec
u32_u64_str bflatn_to_bsatn_slow_path 100 3.6±0.00µs 3.5±0.00µs 26.8 Mtx/sec 27.0 Mtx/sec
u32_u64_str bsatn 100 2.5±0.00µs 2.5±0.01µs 38.8 Mtx/sec 38.7 Mtx/sec
u32_u64_str json 100 5.1±0.02µs 5.0±0.08µs 18.8 Mtx/sec 19.1 Mtx/sec
u32_u64_str product_value 100 1015.6±4.91ns 1015.3±0.42ns 93.9 Mtx/sec 93.9 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_fast_path 100 1387.4±2.19ns 1384.7±2.10ns 68.7 Mtx/sec 68.9 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_slow_path 100 2.8±0.01µs 2.8±0.00µs 34.2 Mtx/sec 34.3 Mtx/sec
u32_u64_u64 bsatn 100 1753.7±35.85ns 1733.1±29.89ns 54.4 Mtx/sec 55.0 Mtx/sec
u32_u64_u64 json 100 3.5±0.09µs 3.3±0.04µs 27.6 Mtx/sec 29.1 Mtx/sec
u32_u64_u64 product_value 100 1011.5±0.52ns 1010.9±0.64ns 94.3 Mtx/sec 94.3 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_fast_path 100 1165.2±1.60ns 1164.8±1.65ns 81.8 Mtx/sec 81.9 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_slow_path 100 2.8±0.01µs 2.8±0.00µs 34.4 Mtx/sec 34.3 Mtx/sec
u64_u64_u32 bsatn 100 1743.2±32.15ns 1729.2±38.65ns 54.7 Mtx/sec 55.1 Mtx/sec
u64_u64_u32 json 100 3.5±0.02µs 3.3±0.05µs 27.1 Mtx/sec 29.3 Mtx/sec
u64_u64_u32 product_value 100 1011.0±0.91ns 1011.3±0.74ns 94.3 Mtx/sec 94.3 Mtx/sec

stdb_module_large_arguments

arg size new latency old latency new throughput old throughput
64KiB 99.7±10.57µs 88.9±6.09µs - -

stdb_module_print_bulk

line count new latency old latency new throughput old throughput
1 35.7±3.40µs 42.1±5.28µs - -
100 347.6±5.22µs 354.0±4.04µs - -
1000 2.9±0.30ms 2.1±0.35ms - -

remaining

name new latency old latency new throughput old throughput
sqlite/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 45.3±0.09µs 46.2±0.23µs 21.6 Ktx/sec 21.1 Ktx/sec
sqlite/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 42.5±9.20µs 40.7±0.09µs 23.0 Ktx/sec 24.0 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 39.1±0.29µs 39.2±0.23µs 25.0 Ktx/sec 24.9 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 34.9±0.22µs 36.1±0.23µs 28.0 Ktx/sec 27.0 Ktx/sec
stdb_module/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 1386.9±10.01µs 1385.3±6.57µs 721 tx/sec 721 tx/sec
stdb_module/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 1062.1±19.48µs 1061.9±14.51µs 941 tx/sec 941 tx/sec
stdb_raw/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 678.6±16.36µs 679.7±21.87µs 1473 tx/sec 1471 tx/sec
stdb_raw/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 528.7±9.18µs 514.3±23.95µs 1891 tx/sec 1944 tx/sec
stdb_raw/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 421.5±0.38µs 426.7±0.97µs 2.3 Ktx/sec 2.3 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 385.6±0.74µs 386.4±0.61µs 2.5 Ktx/sec 2.5 Ktx/sec

@github-actions
Copy link

@github-actions github-actions bot commented on 6810821 May 1, 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 6174 6174 0.00% 7066 7066 0.00%
sqlite 5564 5564 0.00% 6078 6078 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 2 string 119591 119591 0.00% 120305 120289 0.01%
stdb_raw u32_u64_str no_index 64 128 1 u64 77263 77263 0.00% 77757 77757 0.00%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25311 25311 0.00% 25777 25781 -0.02%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24269 24269 0.00% 24583 24583 0.00%
sqlite u32_u64_str no_index 64 128 2 string 143685 143685 0.00% 145345 145353 -0.01%
sqlite u32_u64_str no_index 64 128 1 u64 123026 123026 0.00% 124314 124314 0.00%
sqlite u32_u64_str btree_each_column 64 128 1 u64 130343 130358 -0.01% 131793 131828 -0.03%
sqlite u32_u64_str btree_each_column 64 128 2 string 133548 133548 0.00% 135306 135306 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 798790 799168 -0.05% 823744 824278 -0.06%
stdb_raw u32_u64_str btree_each_column 64 128 930689 932577 -0.20% 979475 981943 -0.25%
sqlite u32_u64_str unique_0 64 128 396133 396133 0.00% 412365 412365 0.00%
sqlite u32_u64_str btree_each_column 64 128 969206 969206 0.00% 1003628 1003632 -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 148069 148069 0.00% 148135 148135 0.00%
stdb_raw u32_u64_str unique_0 64 15892 15883 0.06% 15958 15949 0.06%
sqlite u32_u64_str unique_0 1024 1044679 1044679 0.00% 1048083 1048083 0.00%
sqlite u32_u64_str unique_0 64 74745 74745 0.00% 75945 75945 0.00%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 bsatn 26691 26691 0.00% 28969 28969 0.00%
64 json 48688 48688 0.00% 51204 51204 0.00%
16 bsatn 8373 8373 0.00% 9733 9733 0.00%
16 json 12434 12434 0.00% 14202 14202 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 21788673 21788948 -0.00% 22386437 22386778 -0.00%
stdb_raw u32_u64_str unique_0 64 128 1270619 1270778 -0.01% 1315283 1315304 -0.00%
sqlite u32_u64_str unique_0 1024 1024 1801858 1801858 0.00% 1811072 1811072 0.00%
sqlite u32_u64_str unique_0 64 128 128394 128394 0.00% 131270 131270 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 6568 6568 0.00% 7484 7484 0.00%
sqlite 5606 5606 0.00% 6138 6138 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 2 string 119985 119985 0.00% 120823 120823 0.00%
stdb_raw u32_u64_str no_index 64 128 1 u64 77657 77657 0.00% 78243 78243 0.00%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24663 24663 0.00% 25105 25105 0.00%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25705 25905 -0.77% 26255 26559 -1.14%
sqlite u32_u64_str no_index 64 128 2 string 145606 145606 0.00% 147478 147474 0.00%
sqlite u32_u64_str no_index 64 128 1 u64 124947 124947 0.00% 126535 126535 0.00%
sqlite u32_u64_str btree_each_column 64 128 2 string 135598 135598 0.00% 137734 137730 0.00%
sqlite u32_u64_str btree_each_column 64 128 1 u64 132439 132439 0.00% 134379 134379 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 748123 748083 0.01% 775059 775027 0.00%
stdb_raw u32_u64_str btree_each_column 64 128 878349 880418 -0.24% 928843 931044 -0.24%
sqlite u32_u64_str unique_0 64 128 413681 413685 -0.00% 429529 429533 -0.00%
sqlite u32_u64_str btree_each_column 64 128 1019781 1019781 0.00% 1052973 1052961 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 148463 148463 0.00% 148533 148533 0.00%
stdb_raw u32_u64_str unique_0 64 16286 16286 0.00% 16356 16356 0.00%
sqlite u32_u64_str unique_0 1024 1047747 1047747 0.00% 1051511 1051511 0.00%
sqlite u32_u64_str unique_0 64 76517 76517 0.00% 77957 77957 0.00%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 bsatn 26691 26691 0.00% 28969 28969 0.00%
64 json 48688 48688 0.00% 51204 51204 0.00%
16 bsatn 8373 8373 0.00% 9733 9733 0.00%
16 json 12434 12434 0.00% 14202 14202 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 20692507 20695976 -0.02% 21398083 21401562 -0.02%
stdb_raw u32_u64_str unique_0 64 128 1223133 1222977 0.01% 1274151 1273921 0.02%
sqlite u32_u64_str unique_0 1024 1024 1809648 1809648 0.00% 1818276 1818276 0.00%
sqlite u32_u64_str unique_0 64 128 132536 132536 0.00% 135582 135582 0.00%

Please sign in to comment.