More linter silencing
[benchmarks-js.git] / max.js
diff --git a/max.js b/max.js
index 5525c9293451fd335924e88a15698b43cf2e31ae..74f6f43f0be9c03fb87d49bf62c1d662c3467e27 100644 (file)
--- a/max.js
+++ b/max.js
@@ -1,11 +1,12 @@
 const Benchmark = require('benny')
-const { generateRandomIntegerArray } = require('./benchmark-utils')
+const { generateRandomNumberArray } = require('./benchmark-utils')
 
-const testArray = generateRandomIntegerArray(10000)
+const testArray = generateRandomNumberArray(10000)
 
 /**
  *
  * @param values
+ * @returns
  */
 function loopMax (values) {
   let max = -Infinity
@@ -18,6 +19,7 @@ function loopMax (values) {
 /**
  *
  * @param values
+ * @returns
  */
 function reduceTernaryMax (values) {
   return values.reduce((a, b) => (a > b ? a : b), -Infinity)
@@ -26,6 +28,7 @@ function reduceTernaryMax (values) {
 /**
  *
  * @param values
+ * @returns
  */
 function reduceMathMax (values) {
   return values.reduce((a, b) => Math.max(a, b), -Infinity)
@@ -34,6 +37,7 @@ function reduceMathMax (values) {
 /**
  *
  * @param values
+ * @returns
  */
 function sortMax (values) {
   return values.sort((a, b) => b - a)[0]
@@ -50,7 +54,7 @@ Benchmark.suite(
   Benchmark.add('reduceTernaryMax', () => {
     reduceTernaryMax(testArray)
   }),
-  Benchmark.add('reduceMathMax', () => {
+  Benchmark.add('reduceMath.max', () => {
     reduceMathMax(testArray)
   }),
   Benchmark.add('sortMax', () => {
@@ -58,6 +62,7 @@ Benchmark.suite(
   }),
   Benchmark.cycle(),
   Benchmark.complete(),
-  Benchmark.save({ file: 'max', format: 'chart.html' }),
-  Benchmark.save({ file: 'max', format: 'table.html' })
+  Benchmark.save({ file: 'max', format: 'json', details: true }),
+  Benchmark.save({ file: 'max', format: 'chart.html', details: true }),
+  Benchmark.save({ file: 'max', format: 'table.html', details: true })
 )