Files
zk-kit/benchmarks/index.ts
Paul Rodas Lema 9adf8bf54b test(benchmarks): improve bechmarks to have complete performance data (#326)
* test(benchmarks): improve bechmarks to have complete performance data

- Added Sparse Merkle Tree to the benchmark suites to complete the available merkle tree
implementations in zk-kit.

- Added operation to the benchmark suites (proof generation, proof verification, update, delete

- Changed the "imt.ts" name to "benchmark-merkle-trees.ts"

- Added README.md documentation about the benchmark suite

- Added log managment with winston library to handle any error produced during the benchmark
withtout break the benchmark execution

re #311

* fix(benchmarks): remove package winston and to-hex libraries to fix validation issues in GH

remove package winston and to-hex libraries to fix validation issues in GH

re #311

* docs(benchmarks): added benchmarks summary

Added benchmarks summary tables for different sizes of samples

and conclusion ideas

re # 311

* Update benchmarks/README.md

Co-authored-by: sripwoud <dev+github@sripwoud.xyz>

* Update benchmarks/benchmark-merkle-trees.ts

Co-authored-by: sripwoud <dev+github@sripwoud.xyz>

* Update benchmarks/README.md

Co-authored-by: sripwoud <dev+github@sripwoud.xyz>

* Update benchmarks/benchmark-merkle-trees.ts

Co-authored-by: sripwoud <dev+github@sripwoud.xyz>

* Update benchmarks/README.md

Co-authored-by: sripwoud <dev+github@sripwoud.xyz>

* refactor(benchmarks): added winston to package.json and refactored index.ts

Added winston to package.json and refactored index.ts to

run the samples with a loop managed by an array

re #311

* Update benchmarks/benchmark-merkle-trees.ts

Co-authored-by: sripwoud <dev+github@sripwoud.xyz>

* fix(benchmarks): added counter initialization mistake

Changed to initialize from -1 instead of 0 to fix the logic to start from the first

samples element

re #311

* docs(benchmarks): changed the usage instructions to point the exisitin script

Change the usage instructions of benchmarks from the npx command to use the

exisiting script in the package.json

re #311

* style(benchmarks): benchmark-merkle-trees.ts changes from prettier validation

Minimal change in the code to add an space to a instruction from prettier lib suggestion

* fix(benchmarks): added the new version of yarn.lock

after the run the yarn command in my local environment plus

add the new dev dependency winston the yarn.lock

have changed some lib versions and added winston

re #311

---------

Co-authored-by: sripwoud <dev+github@sripwoud.xyz>
Co-authored-by: Cedoor <me@cedoor.dev>
2024-09-25 10:00:50 +02:00

9 lines
233 B
TypeScript

import run from "./benchmark-merkle-trees"
const treeDepthSamples: number[] = [3, 7, 10]
let numberOfLeaves: number
treeDepthSamples.forEach((treeDepth) => {
numberOfLeaves = 2 ** treeDepth
run(treeDepth, numberOfLeaves)
})