Skip to content

Commit 02f46e6

Browse files
committed
Merge branch 'dkijania/build_performance_tooling_in_ci' into dkijania/build_performance_tooling_in_ci_dev
2 parents 5687e50 + 7473a7c commit 02f46e6

22 files changed

+289
-175
lines changed

buildkite/scripts/bench/run.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
set -eox pipefail
4+
5+
# Don't prompt for answers during apt-get install
6+
7+
YELLOW_THRESHOLD="0.1"
8+
RED_THRESHOLD="0.3"
9+
EXTRA_ARGS=""
10+
11+
source buildkite/scripts/bench/install.sh
12+
13+
MAINLINE_BRANCHES="-m develop -m compatile -m master -m dkijania/build_performance_tooling_in_ci"
14+
while [[ "$#" -gt 0 ]]; do case $1 in
15+
heap-usage) BENCHMARK="heap-usage"; ;;
16+
mina-base) BENCHMARK="mina-base"; ;;
17+
ledger-export)
18+
BENCHMARK="ledger-export"
19+
EXTRA_ARGS="--genesis-ledger-path ./genesis_ledgers/devnet.json"
20+
;;
21+
snark)
22+
BENCHMARK="snark";
23+
K=1
24+
MAX_NUM_UPDATES=4
25+
MIN_NUM_UPDATES=2
26+
EXTRA_ARGS="--k ${K} --max-num-updates ${MAX_NUM_UPDATES} --min-num-updates ${MIN_NUM_UPDATES}"
27+
;;
28+
zkapp) BENCHMARK="zkapp"; ;;
29+
--yellow-threshold) YELLOW_THRESHOLD="$2"; shift;;
30+
--red-threshold) RED_THRESHOLD="$2"; shift;;
31+
*) echo "Unknown parameter passed: $1"; exit 1;;
32+
esac; shift; done
33+
34+
python3 ./scripts/benchmarks test --benchmark ${BENCHMARK} --branch ${BUILDKITE_BRANCH} --tmpfile ${BENCHMARK}.csv --yellow-threshold $YELLOW_THRESHOLD --red-threshold $RED_THRESHOLD $MAINLINE_BRANCHES $EXTRA_ARGS

buildkite/scripts/bench/snark_transaction_profiler.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

buildkite/scripts/bench/zkapp_metrics.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

buildkite/src/Command/Bench/Base.dhall

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ let command
6060
, commands =
6161
RunInToolchain.runInToolchain
6262
(Benchmarks.toEnvList Benchmarks.Type::{=})
63-
"./buildkite/scripts/benchmarks.sh ${spec.bench} --red-threshold ${Double/show
64-
spec.redThreshold} --yellow-threshold ${Double/show
65-
spec.yellowThreshold}"
66-
, label = "Perf: ${spec.label}"
63+
"./buildkite/scripts/bench/run.sh ${spec.bench} --red-threshold ${Double/show
64+
spec.redThreshold} --yellow-threshold ${Double/show
65+
spec.yellowThreshold}"
66+
, label =
67+
"Perf: ${spec.label} ${PipelineMode.capitalName spec.mode}"
6768
, key = spec.key
6869
, target = spec.size
6970
, docker = None Docker.Type
@@ -80,8 +81,12 @@ let pipeline
8081
, SelectFiles.exactly
8182
"buildkite/src/Command/Bench/Base"
8283
"dhall"
84+
, SelectFiles.exactly "buildkite/scripts/bench/install" "sh"
85+
, SelectFiles.exactly "buildkite/scripts/bench/run" "sh"
8386
, SelectFiles.contains "scripts/benchmark"
84-
, SelectFiles.contains "buildkite/scripts/benchmark"
87+
, SelectFiles.exactly
88+
"buildkite/src/Jobs/Bench/${spec.name}"
89+
"dhall"
8590
]
8691
# spec.additionalDirtyWhen
8792
, path = spec.path

buildkite/src/Constants/Benchmarks.dhall

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
let Spec =
22
{ Type = { tokenEnvName : Text, bucket : Text, org : Text, host : Text }
33
, default =
4-
{ tokenEnvName = "\\\${INFLUX_TOKEN}"
5-
, bucket = "\\\${INFLUX_BUCKET_NAME}"
6-
, org = "\\\${INFLUX_ORG}"
7-
, host = "\\\${INFLUX_HOST}"
4+
{ tokenEnvName = "\\\${INFLUXDB_TOKEN}"
5+
, bucket = "\\\${INFLUXDB_BUCKET}"
6+
, org = "\\\${INFLUXDB_ORG}"
7+
, host = "\\\${INFLUXDB_HOST}"
88
}
99
}
1010

buildkite/src/Constants/DebianVersions.dhall

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ let minimalDirtyWhen =
8383
, S.exactly "buildkite/scripts/build-artifact" "sh"
8484
, S.exactly "buildkite/scripts/build-hardfork-package" "sh"
8585
, S.exactly "buildkite/scripts/check-compatibility" "sh"
86-
, S.exactly "buildkite/src/Jobs/Test/RunSnarkProfiler" "dhall"
87-
, S.exactly "buildkite/scripts/bench/snark_transaction_profiler" "sh"
8886
, S.exactly "buildkite/scripts/version-linter" "sh"
8987
, S.exactly "scripts/version-linter" "py"
9088
]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let PipelineMode = ../../Pipeline/Mode.dhall
6+
7+
let name = "HeapUsageStable"
8+
9+
let bench = "heap-usage"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, mode = PipelineMode.Type.Stable
15+
, path = "Bench"
16+
, name = name
17+
, label = "Heap Usage"
18+
, key = bench
19+
, bench = bench
20+
}
21+
)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let name = "HeapUsageUnstable"
6+
7+
let bench = "heap-usage"
8+
9+
in Pipeline.build
10+
( BenchBase.pipeline
11+
BenchBase.Spec::{
12+
, path = "Bench"
13+
, name = name
14+
, label = "Heap Usage"
15+
, key = bench
16+
, bench = bench
17+
, yellowThreshold = 0.1
18+
, redThreshold = 0.3
19+
}
20+
)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let PipelineMode = ../../Pipeline/Mode.dhall
6+
7+
let name = "LedgerExportStable"
8+
9+
let bench = "ledger-export"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, mode = PipelineMode.Type.Stable
15+
, path = "Bench"
16+
, name = name
17+
, label = "Ledger Export"
18+
, key = bench
19+
, bench = bench
20+
}
21+
)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let Size = ../../Command/Size.dhall
6+
7+
let name = "LedgerExportUnstable"
8+
9+
let bench = "ledger-export"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, path = "Bench"
15+
, name = name
16+
, label = "Ledger Export"
17+
, size = Size.Small
18+
, bench = bench
19+
, key = bench
20+
, yellowThreshold = 0.1
21+
, redThreshold = 0.3
22+
}
23+
)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let PipelineMode = ../../Pipeline/Mode.dhall
6+
7+
let name = "MinaBaseStable"
8+
9+
let bench = "mina-base"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, mode = PipelineMode.Type.Stable
15+
, path = "Bench"
16+
, name = name
17+
, label = "Mina Base"
18+
, key = bench
19+
, bench = bench
20+
}
21+
)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let Size = ../../Command/Size.dhall
6+
7+
let name = "MinaBaseUnstable"
8+
9+
let bench = "mina-base"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, path = "Bench"
15+
, name = name
16+
, label = "Mina Base"
17+
, size = Size.Small
18+
, bench = bench
19+
, key = bench
20+
, yellowThreshold = 0.1
21+
, redThreshold = 0.3
22+
}
23+
)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let PipelineMode = ../../Pipeline/Mode.dhall
6+
7+
let name = "SnarkProfilerStable"
8+
9+
let bench = "snark"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, mode = PipelineMode.Type.Stable
15+
, path = "Bench"
16+
, name = name
17+
, label = "Snark Profiler"
18+
, key = bench
19+
, bench = bench
20+
}
21+
)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let Size = ../../Command/Size.dhall
6+
7+
let name = "SnarkProfilerUnstable"
8+
9+
let bench = "snark"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, path = "Bench"
15+
, name = name
16+
, label = "Snark Profiler"
17+
, size = Size.Small
18+
, bench = bench
19+
, key = bench
20+
, yellowThreshold = 0.1
21+
, redThreshold = 0.3
22+
}
23+
)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let PipelineMode = ../../Pipeline/Mode.dhall
6+
7+
let name = "ZkappLimitsStable"
8+
9+
let bench = "zkapp"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, mode = PipelineMode.Type.Stable
15+
, path = "Bench"
16+
, name = name
17+
, label = "Zkapp Limits"
18+
, key = bench
19+
, bench = bench
20+
}
21+
)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
let BenchBase = ../../Command/Bench/Base.dhall
2+
3+
let Pipeline = ../../Pipeline/Dsl.dhall
4+
5+
let Size = ../../Command/Size.dhall
6+
7+
let name = "ZkappLimitsUnstable"
8+
9+
let bench = "zkapp"
10+
11+
in Pipeline.build
12+
( BenchBase.pipeline
13+
BenchBase.Spec::{
14+
, path = "Bench"
15+
, name = name
16+
, label = "Zkapp Limits"
17+
, size = Size.Small
18+
, key = bench
19+
, bench = bench
20+
, yellowThreshold = 0.1
21+
, redThreshold = 0.3
22+
}
23+
)

0 commit comments

Comments
 (0)