Skip to content

Commit

Permalink
ci: Add degree lowering benchmark to codspeed
Browse files Browse the repository at this point in the history
changelog: ignore
  • Loading branch information
jan-ferdinand committed Jan 22, 2025
1 parent 872d42c commit 048ea2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
mem_io
prove_fib
verify_halt
degree_lowering
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
Expand Down
7 changes: 4 additions & 3 deletions triton-constraint-builder/benches/degree_lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ criterion_group! {
}

fn assemble_constraints(criterion: &mut Criterion) {
criterion.bench_function("assemble all constraints", |bencher| {
criterion.bench_function("Assemble all constraints", |bencher| {
bencher.iter(|| black_box(Constraints::all()))
});
}
Expand All @@ -35,10 +35,11 @@ fn degree_lower_constraint_types(c: &mut Criterion) {

fn degree_lower_constraints<II: InputIndicator>(
group: &mut BenchmarkGroup<WallTime>,
bench_name: &str,
constraint_group_name: &str,
constraints: Vec<ConstraintCircuitMonad<II>>,
) {
let info = Constraints::default_degree_lowering_info();
let bench_name = format!("Degree-lower {constraint_group_name} constraints");
group.bench_function(bench_name, |bencher| {
bencher.iter_batched(
|| constraints.clone(),
Expand All @@ -50,7 +51,7 @@ fn degree_lower_constraints<II: InputIndicator>(

fn degree_lower_all(criterion: &mut Criterion) {
let info = Constraints::default_degree_lowering_info();
criterion.bench_function("degree lower all constraints", |bencher| {
criterion.bench_function("Degree-lower all constraints", |bencher| {
bencher.iter_batched(
Constraints::all,
|mut c| black_box(c.lower_to_target_degree_through_substitutions(info)),
Expand Down

0 comments on commit 048ea2e

Please sign in to comment.