Skip to main content

benchmarkEvaluatorThroughputAsync

benchmarkEvaluatorThroughputAsync(iterations?: number, options?: AsyncOptions): Promise<EvaluatorBenchmarkResult>

Import

const poker = require('poker-calculations');

ESM (Node):

import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const poker = require('poker-calculations');

When to use

Run evaluator benchmarks without blocking the event loop. Optional AsyncOptions cancel via AbortSignal. You may pass only { signal } when iterations is omitted (defaults to 200000).

How to use

const poker = require('poker-calculations');

const bench = await poker.benchmarkEvaluatorThroughputAsync(50_000);

const ac = new AbortController();
const pending = poker.benchmarkEvaluatorThroughputAsync(500_000, { signal: ac.signal });
// ac.abort(); // Promise rejects with AbortError

See also

benchmarkEvaluatorThroughput · AsyncOptions