Skip to content

Commit

Permalink
Increase Tree benchmark timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Dec 16, 2021
1 parent eba2f2a commit 579d74d
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import {LeafNode, toGindex, Tree, zeroNode} from "@chainsafe/persistent-merkle-t
import {MutableVector} from "@chainsafe/persistent-ts";
import {itBench, setBenchOpts} from "@dapplion/benchmark";

const n = 250_000;
const ih = Math.round(n / 2);
const runsFactor = 1000;

// Understand the cost of each array-ish data structure to:
// - Get one element
// - Set one element
Expand Down Expand Up @@ -44,6 +40,10 @@ const runsFactor = 1000;
// ✓ Array 250000 set(249999) 2100840 ops/s 476.0000 ns/op - 1245961 runs 1.08 s
// ✓ Array 250000 iterate all - loop 3009.592 ops/s 332.2710 us/op - 3006 runs 1.00 s

const n = 250_000;
const ih = Math.round(n / 2);
const runsFactor = 1000;

describe("Tree (persistent-merkle-tree)", () => {
// Don't track regressions in CI
setBenchOpts({noThreshold: true});
Expand All @@ -54,11 +54,11 @@ describe("Tree (persistent-merkle-tree)", () => {
let tree: Tree;

before(function () {
this.timeout(60_000);
this.timeout(120_000);
tree = getTree(d, n);
});

itBench({id: `Tree ${d} ${n} create`, timeoutBench: 60_000}, () => {
itBench({id: `Tree ${d} ${n} create`, timeoutBench: 120_000}, () => {
getTree(d, n);
});

Expand Down

0 comments on commit 579d74d

Please sign in to comment.