Debian Codegraph @

fastify-busboy/benchmarks/common/executionUtils.js

raw
1 'use strict'
2
3 const { getCommonBuilder } = require('./commonBuilder')
4 const { outputResults } = require('./resultUtils')
5
6 function getMeasureFn (constestandId, fn) {
7 return () => {
8 const benchmark = getCommonBuilder()
9 .benchmarkEntryName(constestandId)
10 .functionUnderTest(fn).build()
11 const benchmarkResults = benchmark.execute()
12 outputResults(benchmark, benchmarkResults)
13 }
14 }
15
16 module.exports = {
17 getMeasureFn
18 }