RafaelGSS / bench-node

A powerful Node.js benchmark library
72 stars 1 forks source link

Consider passing `bench` reference to onCompleteBenchmark getResult getReport #19

Closed naugtur closed 6 days ago

naugtur commented 1 week ago

When there's more than one task in the suite, it's super annoying to have to capture the name from before or after in the returned code that puts it in the context to get it in results in onCompleteBenchmark as the only option to aggregate results across runs and differentiating the tasks.

I don't know how to get the bench task name in the getR* functions to return the right value.

Alternatively, having an option to pass plugin constructor and get it instantiated separately for each task would make plugin authoring easier.

thoughts?