From 0b6210cd37b68b94252cb798598b12974a20e1c1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 21 May 2024 22:56:19 +0200 Subject: Adding upstream version 5.28.2+dfsg1+~cs23.11.12.3. Signed-off-by: Daniel Baumann --- fastify-busboy/benchmarks/common/executionUtils.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 fastify-busboy/benchmarks/common/executionUtils.js (limited to 'fastify-busboy/benchmarks/common/executionUtils.js') diff --git a/fastify-busboy/benchmarks/common/executionUtils.js b/fastify-busboy/benchmarks/common/executionUtils.js new file mode 100644 index 0000000..8c52ec8 --- /dev/null +++ b/fastify-busboy/benchmarks/common/executionUtils.js @@ -0,0 +1,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 +} -- cgit v1.2.3