perf: export also JSON results with external pools benchmark
[poolifier.git] / benchmarks / versus-external-pools / functions / function-to-bench.js
index eca756b715d3a0052c99db37aafe9cc6ab1e3492..ff13bc9ecd2ad04fb034bab8a622198ad748e10a 100644 (file)
@@ -5,9 +5,9 @@
  * @param {*} data The worker data.
  * @returns {*} The result.
  */
-const functionToBench = (data) => {
-  const crypto = require('crypto')
-  const fs = require('fs')
+const functionToBench = data => {
+  const crypto = require('node:crypto')
+  const fs = require('node:fs')
   const TaskTypes = {
     CPU_INTENSIVE: 'CPU_INTENSIVE',
     IO_INTENSIVE: 'IO_INTENSIVE'