diff --git a/benchmarks/README.md b/benchmarks/README.md index 0cc8484c8c5d58507915ec21cbf05d7956da2205..dbaba9683e962ac82035bdb7672df988b0724243 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -117,6 +117,16 @@ let benchmarks = { ffs: ["fp128", "bls12-381"], output: "fri.ndjson", }, + field: { + enabled: true, + nb_measurements: 1000, + output: "field.ndjson", + }, + curve_group: { + enabled: true, + nb_measurements: 1000, + output: "curve_group.ndjson", + }, } ``` diff --git a/benchmarks/mod.nu b/benchmarks/mod.nu index cec02143aabefaf383e8e4a5a408169815d3118e..559ce8f373caf9e93282e97df8a6424422d9f0c2 100644 --- a/benchmarks/mod.nu +++ b/benchmarks/mod.nu @@ -85,6 +85,8 @@ export def main [ ffs: list<string>, output: string, >, + field: record<enabled: bool, nb_measurements: int, output: string>, + curve_group: record<enabled: bool, nb_measurements: int, output: string>, >, --output-dir: path = ".", ] { @@ -122,6 +124,24 @@ export def main [ --folding-factors $it.ns ) | to ndjson out> $it.output }} + | insert field.run {{ |it| + cargo run ...[ + --bin field + --release + --package benchmarks + -- + --nb-measurements $it.nb_measurements + ] out>> ($target | path join $it.output) + }} + | insert curve_group.run {{ |it| + cargo run ...[ + --bin curve_group + --release + --package benchmarks + -- + --nb-measurements $it.nb_measurements + ] out>> ($target | path join $it.output) + }} let _ = $benchmarks | items { |k, b| if ($b.enabled? | default true) { @@ -131,14 +151,4 @@ export def main [ log warning $"skipping (ansi cyan)($k)(ansi reset)" } } - - # const OPTIONS = [ - # --release - # --package benchmarks - # -- - # --nb-measurements 1000 - # ] - # cargo run --bin field_operations ...$OPTIONS out> ($target | path join field.ndjson) - # cargo run --bin curve_group_operations ...$OPTIONS out> ($target | path join curve_group.ndjson) } - diff --git a/benchmarks/src/bin/operations/curve_group.rs b/benchmarks/src/bin/curve_group.rs similarity index 100% rename from benchmarks/src/bin/operations/curve_group.rs rename to benchmarks/src/bin/curve_group.rs diff --git a/benchmarks/src/bin/operations/field.rs b/benchmarks/src/bin/field.rs similarity index 100% rename from benchmarks/src/bin/operations/field.rs rename to benchmarks/src/bin/field.rs