From: Jérôme Benoit Date: Sun, 12 May 2024 19:33:08 +0000 (+0200) Subject: perf: reenable benchmark X-Git-Tag: v4.0.7~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e36fefed51e0513e7fb1af36d11a8050e713a971;p=poolifier.git perf: reenable benchmark Signed-off-by: Jérôme Benoit --- diff --git a/.github/workflows/internal-benchmark.yml b/.github/workflows/internal-benchmark.yml index 46692bf1..52e806da 100644 --- a/.github/workflows/internal-benchmark.yml +++ b/.github/workflows/internal-benchmark.yml @@ -30,14 +30,14 @@ jobs: cache: 'pnpm' - name: Install dependencies run: pnpm install --ignore-scripts --frozen-lockfile - # - uses: bencherdev/bencher@main - # - name: Run production benchmark - # run: | - # bencher run \ - # --if-branch "$GITHUB_REF_NAME" \ - # --else-if-branch "$GITHUB_BASE_REF" \ - # --else-if-branch master \ - # --hash "$GITHUB_SHA" \ - # --err \ - # --github-actions ${{ secrets.GITHUB_TOKEN }} \ - # "pnpm benchmark:benchmark.js:prod" + - uses: bencherdev/bencher@main + - name: Run production benchmark + run: | + bencher run \ + --if-branch "$GITHUB_REF_NAME" \ + --else-if-branch "$GITHUB_BASE_REF" \ + --else-if-branch master \ + --hash "$GITHUB_SHA" \ + --err \ + --github-actions ${{ secrets.GITHUB_TOKEN }} \ + "pnpm benchmark:benchmark.js:prod" diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index 41cf62e6..da0c023d 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -17,7 +17,7 @@ const poolSize = availableParallelism() const taskExecutions = 1 const workerData = { function: TaskFunctions.factorial, - taskSize: 50000 + taskSize: 1000 } switch (