Skip to content

Commit

Permalink
refactor(reporter): simplify iters std dev computation
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Oct 3, 2024
1 parent 40638ae commit c13fc14
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/reporter/json/bmf.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { ratioStandardDeviation } from '../../stats-utils.js'

export const bmf = report => {
return report.benchmarks
.filter(benchmark => benchmark.error == null)
.map(({ name, stats }) => {
const throughputSd = ratioStandardDeviation(1e9, 0, stats?.avg, stats?.sd)
// https://en.wikipedia.org/wiki/Propagation_of_uncertainty#Example_formulae
const throughputSd = (1e9 * stats?.sd) / stats?.avg ** 2
return {
[name]: {
latency: {
Expand Down

0 comments on commit c13fc14

Please sign in to comment.