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