tinylibs / tinybench

🔎 A simple, tiny and lightweight benchmarking library!
MIT License
1.73k stars 36 forks source link

reorder teardown callback to after the error event, and setResults. #63

Open jdmarshall opened 10 months ago

jdmarshall commented 10 months ago

fix for #61

Change order of operations to

I'm not sure why you would ever call teardown before dealing with an error that was part of the test run.

Putting teardown after setResults allows a person to purge the samples to avoid memory starvation in longer test runs.