Skip to content

Commit

Permalink
Shorten benchmark names and fix CI (lurk-lang#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelburnham authored Jan 17, 2024
1 parent def59e2 commit 1b02239
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gpu-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
# Create a `criterion-table` and write in commit comment
- name: Run `criterion-table`
run: |
cat supernova-ci-${{ env.BASE_COMMIT }}.json | criterion-table > BENCHMARKS.md
cat supernova-ci-${{ env.BASE_COMMIT }}.json supernova-ci-${{ github.sha }}.json | criterion-table > BENCHMARKS.md
- name: Write bench on commit comment
uses: peter-evans/commit-comment@v3
with:
Expand Down
12 changes: 8 additions & 4 deletions benches/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ impl BenchParams {
let output_type = output_type_env().unwrap_or("stdout".into());
match output_type.as_ref() {
"pr-comment" => BenchmarkId::new(name, format!("StepCircuitSize-{}", self.step_size)),
"commit-comment" => BenchmarkId::new(
format!("ref={}", self.sha),
format!("{}-StepCircuitSize-{}", name, self.step_size),
),
"commit-comment" => {
let mut short_sha = self.sha.to_owned();
short_sha.truncate(7);
BenchmarkId::new(
format!("ref={}", short_sha),
format!("{}-NumCons-{}", name, self.step_size),
)
}
// TODO: refine "gh-pages"
_ => BenchmarkId::new(
name,
Expand Down
30 changes: 5 additions & 25 deletions benches/common/supernova/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,28 @@ use crate::common::supernova::{bench::run_bench, SnarkType, S1, S2, SS1, SS2};

// Recursive Supernova SNARK benchmarks
pub fn bench_one_augmented_circuit_recursive_snark(c: &mut Criterion) {
run_bench::<S1, S2>(
c,
"RecursiveSNARKSuperNova-1circuit",
1,
SnarkType::Recursive,
)
run_bench::<S1, S2>(c, "RecursiveSNARK-NIVC-1", 1, SnarkType::Recursive)
}

pub fn bench_two_augmented_circuit_recursive_snark(c: &mut Criterion) {
run_bench::<S1, S2>(
c,
"RecursiveSNARKSuperNova-2circuit",
2,
SnarkType::Recursive,
)
run_bench::<S1, S2>(c, "RecursiveSNARK-NIVC-2", 2, SnarkType::Recursive)
}

// Compressed Supernova SNARK benchmarks
pub fn bench_one_augmented_circuit_compressed_snark(c: &mut Criterion) {
run_bench::<S1, S2>(
c,
"CompressedSNARKSuperNova-1circuit",
1,
SnarkType::Compressed,
)
run_bench::<S1, S2>(c, "CompressedSNARK-NIVC-1", 1, SnarkType::Compressed)
}

pub fn bench_two_augmented_circuit_compressed_snark(c: &mut Criterion) {
run_bench::<S1, S2>(
c,
"CompressedSNARKSuperNova-2circuit",
2,
SnarkType::Compressed,
)
run_bench::<S1, S2>(c, "CompressedSNARK-NIVC-2", 2, SnarkType::Compressed)
}

pub fn bench_two_augmented_circuit_compressed_snark_with_computational_commitments(
c: &mut Criterion,
) {
run_bench::<SS1, SS2>(
c,
"CompressedSNARKSuperNova-Commitments-2circuit",
"CompressedSNARK-NIVC-Commitments-2",
2,
SnarkType::Compressed,
)
Expand Down

0 comments on commit 1b02239

Please sign in to comment.