From 4e2f60b5b8257e9e8898047babca099f15dd3759 Mon Sep 17 00:00:00 2001 From: dapplion Date: Tue, 1 Dec 2020 08:29:19 +0000 Subject: [PATCH] Fix benchmark setup --- {test/benchmark => benchmark}/index.ts | 6 +++--- {test/benchmark => benchmark}/noble.ts | 2 +- {test/benchmark => benchmark}/package.json | 3 ++- {test/benchmark => benchmark}/runner.ts | 0 {test/benchmark => benchmark}/yarn.lock | 0 package.json | 4 ++-- tsconfig.json | 1 - 7 files changed, 8 insertions(+), 8 deletions(-) rename {test/benchmark => benchmark}/index.ts (93%) rename {test/benchmark => benchmark}/noble.ts (97%) rename {test/benchmark => benchmark}/package.json (66%) rename {test/benchmark => benchmark}/runner.ts (100%) rename {test/benchmark => benchmark}/yarn.lock (100%) diff --git a/test/benchmark/index.ts b/benchmark/index.ts similarity index 93% rename from test/benchmark/index.ts rename to benchmark/index.ts index a48e22d..72b523d 100644 --- a/test/benchmark/index.ts +++ b/benchmark/index.ts @@ -1,7 +1,7 @@ import {runBenchmark} from "./runner"; -import {runForAllImplementations} from "../switch"; -import {PublicKey, Signature} from "../../src/interface"; -import {range, randomMessage} from "../util"; +import {runForAllImplementations} from "../test/switch"; +import {PublicKey, Signature} from "../src/interface"; +import {range, randomMessage} from "../test/util"; const aggCount = 30; diff --git a/test/benchmark/noble.ts b/benchmark/noble.ts similarity index 97% rename from test/benchmark/noble.ts rename to benchmark/noble.ts index 9d78d25..23f598f 100644 --- a/test/benchmark/noble.ts +++ b/benchmark/noble.ts @@ -1,5 +1,5 @@ import {runBenchmark} from "./runner"; -import {range, randomMessage} from "../util"; +import {range, randomMessage} from "../test/util"; import {generateRandomSecretKey} from "@chainsafe/bls-keygen"; import * as noble from "noble-bls12-381"; diff --git a/test/benchmark/package.json b/benchmark/package.json similarity index 66% rename from test/benchmark/package.json rename to benchmark/package.json index b9b267b..4b404a9 100644 --- a/test/benchmark/package.json +++ b/benchmark/package.json @@ -4,7 +4,8 @@ "main": "index.js", "license": "MIT", "scripts": { - "benchmark": "ts-node index && ts-node noble" + "benchmark": "ts-node index", + "benchmark:all": "ts-node index && ts-node noble" }, "dependencies": { "noble-bls12-381": "^0.6.1" diff --git a/test/benchmark/runner.ts b/benchmark/runner.ts similarity index 100% rename from test/benchmark/runner.ts rename to benchmark/runner.ts diff --git a/test/benchmark/yarn.lock b/benchmark/yarn.lock similarity index 100% rename from test/benchmark/yarn.lock rename to benchmark/yarn.lock diff --git a/package.json b/package.json index 190a7ae..49491ab 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,8 @@ "test": "yarn run test:unit && yarn run test:spec", "download-test-cases": "ts-node test/downloadSpecTests.ts", "coverage": "codecov -F bls", - "benchmark": "ts-node test/benchmark", - "benchmark:all": "cd test/benchmark && yarn install && yarn benchmark" + "benchmark": "ts-node benchmark", + "benchmark:all": "cd benchmark && yarn install && yarn benchmark" }, "dependencies": { "@chainsafe/bls-keygen": "^0.3.0", diff --git a/tsconfig.json b/tsconfig.json index 06734bd..a15932d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,5 @@ { "include": ["src", "test"], - "exclude": ["test/benchmark"], "compilerOptions": { "target": "esnext", "module": "commonjs",