summaryrefslogtreecommitdiffstats
path: root/fastify-busboy/benchmarks/common/resultUtils.js
diff options
context:
space:
mode:
Diffstat (limited to 'fastify-busboy/benchmarks/common/resultUtils.js')
-rw-r--r--fastify-busboy/benchmarks/common/resultUtils.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/fastify-busboy/benchmarks/common/resultUtils.js b/fastify-busboy/benchmarks/common/resultUtils.js
new file mode 100644
index 0000000..ec7bce7
--- /dev/null
+++ b/fastify-busboy/benchmarks/common/resultUtils.js
@@ -0,0 +1,17 @@
+'use strict'
+
+const { exportResults } = require('photofinish')
+
+function outputResults (benchmark, benchmarkResults) {
+ console.log(
+ `Mean time for ${
+ benchmark.benchmarkEntryName
+ } is ${benchmarkResults.meanTime.getTimeInNanoSeconds()} nanoseconds`
+ )
+
+ exportResults(benchmarkResults, { exportPath: '_results' })
+}
+
+module.exports = {
+ outputResults
+}