Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: name field in Bench #81

Open
colinhacks opened this issue May 15, 2024 · 1 comment
Open

Feature request: name field in Bench #81

colinhacks opened this issue May 15, 2024 · 1 comment

Comments

@colinhacks
Copy link

colinhacks commented May 15, 2024

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.

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 👍

@Aslemammad
Copy link
Member

Aslemammad commented May 15, 2024

Let's have this one! 🚀 Feel free to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants