From fe2fe06542722d8a40c9c9dbff1c09bb1f89fae7 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 21 Apr 2024 11:50:54 +0330 Subject: [PATCH] readme --- README.md | 4 +--- src/bench.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5035af0..e2eef5c 100644 --- a/README.md +++ b/README.md @@ -374,7 +374,7 @@ It may make your benchmarks slower, check #42. ## Concurrency - When `mode` is set to `null` (default), concurrency is disabled. -- When `mode` is set to 'task', each task's iterations run concurrently. +- When `mode` is set to 'task', each task's iterations (calls of a task function) run concurrently. - When `mode` is set to 'bench', different tasks within the bench run concurrently. Concurrent cycles. ```ts @@ -389,8 +389,6 @@ await bench.run() await bench.runConcurrently(10, "task") // with runConcurrently, mode is set to 'bench' by default ``` -The options way of doing concurrency also affects `bench.warmup` and makes it concurrent too. Useful for concurrent warm ups. - ## Prior art - [Benchmark.js](https://github.com/bestiejs/benchmark.js) diff --git a/src/bench.ts b/src/bench.ts index 93ea905..cab5993 100644 --- a/src/bench.ts +++ b/src/bench.ts @@ -29,7 +29,7 @@ export default class Bench extends EventTarget { * Executes tasks concurrently based on the specified concurrency mode. * * - When `mode` is set to `null` (default), concurrency is disabled. - * - When `mode` is set to 'task', each task's iterations run concurrently. + * - When `mode` is set to 'task', each task's iterations (calls of a task function) run concurrently. * - When `mode` is set to 'bench', different tasks within the bench run concurrently. */ concurrency: 'task' | 'bench' | null = null;