Skip to content

Commit c6c221f

Browse files
committed
expand benchmark coverage across runtime workloads
1 parent cbe5e6a commit c6c221f

4 files changed

Lines changed: 384 additions & 3 deletions

File tree

benchmarks/smoke_thresholds.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
# but tight enough to catch obvious regressions.
77

88
BenchmarkExecutionArithmeticLoop 5000000 1000
9+
BenchmarkExecutionArrayPipeline 30000000 20000
910
BenchmarkExecutionMethodDispatchLoop 8000000 6000
1011
BenchmarkExecutionCapabilityFindLoop 12000000 9000
12+
BenchmarkExecutionCapabilityWorkflowLoop 14000000 15000
13+
BenchmarkExecutionJSONParseLoop 3000000 5000
1114
BenchmarkExecutionJSONStringifyLoop 3000000 4000
1215
BenchmarkExecutionRegexReplaceAllLoop 4000000 4000
1316
BenchmarkExecutionTallyLoop 10000000 2000
17+
BenchmarkCallShortScript 20000 60
18+
BenchmarkModuleRequireCacheHit 120000 220

scripts/bench_runtime.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Runs VibeScript Go benchmarks with stable defaults and records output.
1010
options:
1111
--count <n> Benchmark count (default: 3)
1212
--benchtime <dur> Benchtime passed to `go test` (default: 1s)
13-
--pattern <regex> Benchmark regex (default: ^BenchmarkExecution)
13+
--pattern <regex> Benchmark regex (default: ^Benchmark)
1414
--package <path> Go package to benchmark (default: ./vibes)
1515
--cpu <list> CPU list for `go test -cpu` (default: 1)
1616
--out <file> Output file (default: benchmarks/latest.txt)
@@ -20,7 +20,7 @@ EOF
2020

2121
count="3"
2222
benchtime="1s"
23-
pattern="^BenchmarkExecution"
23+
pattern="^Benchmark"
2424
pkg="./vibes"
2525
cpu="1"
2626
out_file="benchmarks/latest.txt"

vibes/execution_benchmark_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import (
88
type benchmarkDBCapability struct{}
99

1010
func (benchmarkDBCapability) Find(ctx context.Context, req DBFindRequest) (Value, error) {
11-
return NewHash(map[string]Value{"score": NewInt(1)}), nil
11+
return NewHash(map[string]Value{
12+
"id": req.ID,
13+
"score": NewInt(1),
14+
}), nil
1215
}
1316

1417
func (benchmarkDBCapability) Query(ctx context.Context, req DBQueryRequest) (Value, error) {

0 commit comments

Comments
 (0)