I am able to successfully create and run benchmark suite, but not sure how to get the benchmark values of each output, this.filter('fastest').pluck('name')
in onComplete
gives me the name of the fastest operation, but I want the ops/sec
value of each function in the test suite. how to get that?
How to display/read results (ops/sec)?
1.9k Views Asked by mido At
1
In your
onComplete
callback you can access your benchmarks throughthis
keyword (which will reference to the current BenchmarkSuite object) like this:Each
bench
is instance of Benchmark. So you can get any information you want (see Benchmark.prototype ). To getops/sec
value use.hz
property of benchmark. A small example for better understanding: