new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Deno · Reference · all subjects

cli commands/bench

10 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

deno bench quickstart example

Example quickstart benchmark file url_bench.ts: ```ts Deno.bench("URL parsing", () => { new URL("https://deno.land"); }); ``` Run with `deno bench url_bench.ts` to execute the benchmark.

deno bench command basic usage

The `deno bench` command runs benchmarks defined using the Deno.bench() API. It can be run with a file name to run a specific benchmark file, with a directory to run all benchmark files in that directory, or with no arguments to run all benchmarks in the current directory recursively.

deno bench file glob pattern

When running `deno bench` without a file argument, it matches files recursively with the glob pattern `{*_,*.,}bench.{ts, tsx, mts, js, mjs, jsx}`. This expands to files named bench.{ts, tsx, mts, js, mjs, jsx}, files ending with .bench.{ts, tsx, mts, js, mjs, jsx}, or files ending with _bench.{ts, tsx, mts, js, mjs, jsx}.

deno bench script arguments with --

To pass additional CLI arguments to benchmark files, use `--` to inform Deno that remaining arguments are script arguments, for example: `deno bench my_bench.ts -- -e --foo --bar`.

deno bench permissions model

The `deno bench` command uses the same permission model as `deno run`, requiring permission flags like `--allow-write` to write to the file system during benchmarking or `--allow-read` to read files.

deno bench --filter flag with string

The `--filter` flag accepts a string value to filter benchmarks by name. For example, `deno bench --filter "bench" benchmarks/` will run all benchmarks containing the word "bench".

deno bench --filter flag with regex pattern

The `--filter` flag accepts a regex pattern wrapped in forward slashes to filter benchmarks. For example, `deno bench --filter "/bench-*\d/" benchmarks/` will run benchmarks matching the pattern.

deno bench --json flag

The `--json` flag outputs benchmark results as JSON. The output includes version, runtime, cpu, and an array of benches with fields: origin, group, name, baseline, and results containing benchmark metrics like n, min, max, avg, p75, p99, p995, p999, highPrecision, and usedExplicitTimers.

deno help bench command

Running `deno help bench` displays all runtime options and command line help for the `deno bench` command.

deno bench command

deno bench is a benchmarking tool.

Give your agent this brain