Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
62107: sql: introduce BenchmarkSampling r=irfansharif a=irfansharif Introduce a benchmark to measure the statement sampling overhead. $ make bench PKG=./pkg/bench TESTFLAGS='-benchtime=5000x -count 10' \ BENCHES='BenchmarkSampling' BENCHTIMEOUT=50m > benchmark-sampling.txt $ cat benchmark-sampling.txt | grep -v sample_rate=1.0 | sed 's/sample_rate=...//' > old.txt $ cat benchmark-sampling.txt | grep -v sample_rate=0.0 | sed 's/sample_rate=...//' > new.txt $ benchstat old.txt new.txt name old time/op new time/op delta Sampling/Cockroach//Scan1-24 416µs ± 1% 451µs ± 1% +8.39% (p=0.000 n=10+10) Sampling/Cockroach//Insert-24 613µs ± 4% 651µs ± 2% +6.33% (p=0.000 n=10+10) Sampling/MultinodeCockroach//Scan1-24 840µs ± 1% 960µs ± 2% +14.24% (p=0.000 n=9+9) Sampling/MultinodeCockroach//Insert-24 1.13ms ± 3% 1.20ms ± 2% +6.56% (p=0.000 n=10+10) name old alloc/op new alloc/op delta Sampling/Cockroach//Scan1-24 24.4kB ± 1% 42.6kB ± 3% +74.82% (p=0.000 n=8+10) Sampling/Cockroach//Insert-24 37.6kB ±11% 50.7kB ± 5% +34.67% (p=0.000 n=10+10) Sampling/MultinodeCockroach//Scan1-24 76.4kB ±20% 112.5kB ± 6% +47.19% (p=0.000 n=10+10) Sampling/MultinodeCockroach//Insert-24 112kB ±24% 123kB ± 8% +9.72% (p=0.035 n=10+10) name old allocs/op new allocs/op delta Sampling/Cockroach//Scan1-24 254 ± 1% 363 ± 1% +43.21% (p=0.000 n=8+9) Sampling/Cockroach//Insert-24 299 ± 2% 397 ± 1% +33.07% (p=0.000 n=10+10) Sampling/MultinodeCockroach//Scan1-24 784 ± 3% 1063 ± 1% +35.57% (p=0.000 n=9+9) Sampling/MultinodeCockroach//Insert-24 770 ±13% 882 ± 2% +14.56% (p=0.000 n=10+9) Release note: None Co-authored-by: irfan sharif <[email protected]>
- Loading branch information