Skip to content
Snippets Groups Projects
Commit b711ad5b authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

add error margins to the plot of the oneshot bench commit (dragoon/komodo!83)

we see that the Arkworks / Komodo versions of the same curves are basically the same.
![Figure_1](/uploads/faa1523bbd3037390eb0c56f037995ea/Figure_1.png)
parent c7e50c56
No related branches found
No related tags found
No related merge requests found
......@@ -96,11 +96,12 @@ these are benchmarks that run a single measurement, implemented as _examples_ in
### commit
```nushell
let degrees = seq 0 15 | each { 2 ** $in }
let res = cargo run --example bench_commit -- --nb-measurements 1 ...$degrees
let res = cargo run --example bench_commit -- --nb-measurements 10 ...$degrees
| lines
| each { from nuon }
| update times { into duration }
| insert t {|it| $it.times | math avg}
| insert mean {|it| $it.times | math avg}
| insert stddev {|it| $it.times | into int | into float | math stddev | into int | into duration}
python scripts/plot/bench_commit.py (
$res | group-by curve --to-table | update items { reject curve } | to json
......
......@@ -11,10 +11,15 @@ if __name__ == "__main__":
for group in data:
xs = [x["degree"] for x in group["items"]]
ys = [x["t"] / NB_NS_IN_MS for x in group["items"]]
ys = [x["mean"] / NB_NS_IN_MS for x in group["items"]]
zs = [x["stddev"] / NB_NS_IN_MS for x in group["items"]]
down = [y - z for (y, z) in zip(ys, zs)]
up = [y + z for (y, z) in zip(ys, zs)]
style = "dashed" if group["group"].endswith("-ark") else "solid"
plt.plot(xs, ys, label=group["group"], marker='o', linestyle=style)
plt.fill_between(xs, down, up, alpha=0.3)
plt.xlabel("degree")
plt.ylabel("time (in ns)")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment