Open colinhacks opened 4 months ago
I was writing a custom prettyprinter for tinybench and found myself wishing there was a way to attach a name field to a Bench instance.
name
Bench
new Bench({ name: "my benchmark" })
That way, I could have a self-contained logger function that I can pass a Bench instance into:
function myLogger(bench: Bench){ console.log(bench.name); console.table(bench.table()); }
Happy to put in a PR if I get a greenlight from a maintainer 👍
Let's have this one! 🚀 Feel free to.
I was writing a custom prettyprinter for tinybench and found myself wishing there was a way to attach a
name
field to aBench
instance.That way, I could have a self-contained logger function that I can pass a
Bench
instance into:Happy to put in a PR if I get a greenlight from a maintainer 👍