perf: switch to mitata
[benchmarks-js.git] / is-undefined.mjs
index b720507111561c7b5337ca88aec132c5c692ee9f..895d41c9b333fac8fb52422d53d857f6f8fa9008 100644 (file)
@@ -1,28 +1,14 @@
-import Benchmark from 'benny'
+import { bench, group, run } from 'mitata'
 
-Benchmark.suite(
-  'Is undefined',
-  Benchmark.add('=== undefined', (value = undefined) => {
+group('Is undefined', () => {
+  bench('=== undefined', (value = undefined) => {
     return value === undefined
-  }),
-  Benchmark.add("typeof === 'undefined'", (value = undefined) => {
+  })
+  bench("typeof === 'undefined'", (value = undefined) => {
     return typeof value === 'undefined'
-  }),
-  Benchmark.cycle(),
-  Benchmark.complete(),
-  Benchmark.save({
-    file: 'is-undefined',
-    format: 'json',
-    details: true
-  }),
-  Benchmark.save({
-    file: 'is-undefined',
-    format: 'chart.html',
-    details: true
-  }),
-  Benchmark.save({
-    file: 'is-undefined',
-    format: 'table.html',
-    details: true
   })
-).catch(console.error)
+})
+
+await run({
+  units: true
+})