From 076028753d04889d4df025cf3afbbf8c59fd6ac0 Mon Sep 17 00:00:00 2001 From: STEVAN Antoine <antoine.stevan@isae-supaero.fr> Date: Tue, 26 Nov 2024 10:16:04 +0000 Subject: [PATCH] update benchmarks readme (dragoon/komodo!176) ## changelog - add more snippets and instructions - add missing imports - update the "atomic operations" section - add a table of contents --- benchmarks/README.md | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/benchmarks/README.md b/benchmarks/README.md index a946dcef..e0870187 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -1,18 +1,45 @@ +# Table of contents +- [Requirements](#requirements) +- [Atomic operations](#atomic-operations) +- [Linear algebra](#linear-algebra) +- [Trusted setup and commit](#trusted-setup-and-commit) +- [End to end benchmarks](#end-to-end-benchmarks) +- [FRI](#fri) + ## requirements -- install [GPLT](https://gitlab.isae-supaero.fr/a.stevan/gplt) +> :bulb: **Note** +> +> these should only be required for plotting results -```nushell -use .nushell/math.nu * -use .nushell/formats.nu * +- install [GPLT](https://gitlab.isae-supaero.fr/a.stevan/gplt) +- create a virtual environment +```bash +const VENV = "~/.local/share/venvs/gplt/bin/activate.nu" | path expand +``` +```bash +virtualenv ($VENV | path dirname --num-levels 2) +``` +- activate the virtual environment +```bash +overlay use $VENV +``` +- activate required modules +```bash +use benchmarks ``` +> :bulb: **Note** +> +> i personally use the [`nuenv` hook](https://github.com/nushell/nu_scripts/blob/main/nu-hooks/nu-hooks/nuenv/hook.nu) +> that reads [`.env.nu`](../.env.nu). + ## atomic operations ```nushell cargo run --release --package benchmarks --bin field_operations -- --nb-measurements 1000 out> field.ndjson cargo run --release --package benchmarks --bin curve_group_operations -- --nb-measurements 1000 out> curve_group.ndjson ``` ```nushell -use .nushell/parse.nu read-atomic-ops +use benchmarks/nu-lib/utils/parse.nu read-atomic-ops gplt multi_bar --title "simple field operations" -l "time (in ns)" ( open field.ndjson @@ -93,6 +120,8 @@ source benchmarks/params/fri.nu ``` - run the benchmarks ```nushell +use std formats "to ndjson" + (benchmarks fri run --data-sizes $DATA_SIZES --ks $KS @@ -107,6 +136,8 @@ source benchmarks/params/fri.nu > the following `watch` call can be used to see the results as they are dumped to `$DATA` > ```nushell +> use std formats "from ndjson" +> > watch . { > open --raw $DATA > | lines -- GitLab