denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.65k stars 5.38k forks source link

[Feature Request] `--quiet` flag for deno bench #17798

Open MierenManz opened 1 year ago

MierenManz commented 1 year ago

For advanced usecases (like v8 flags and their logs) it would be nice to be able to run your benchmarks but mute the benchmark output with --quiet

Currently this is not possible and --quiet does not do anything. It would be a nice addition so that it's easier to trace (de)optimizations or something similar without having to filter the output by hand

GJZwiers commented 1 year ago

Currently this is not possible and --quiet does not do anything

--quiet does suppress the output of the code that is being benchmarked, e.g. if you had something like this:

Deno.bench(function log() {
  console.log("benching log");
});

In this case deno bench will output a high number of logs to the terminal, but deno bench --quiet will not. Being able to suppress all output, including the bench reports, might be interesting for some use cases though.