Skip to content

Feature request: name field in Bench #81

@colinhacks

Description

@colinhacks

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 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions