How to use the benchmark.js-plot.plot function in benchmark

To help you get started, we’ve selected a few benchmark examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AlexeyKupershtokh / node-v8-clone / bench / shared.js View on Github external
var plot = require('benchmark.js-plot').plot;
var Benchmark = require('benchmark');

var range = function(n) {
  var result = [];
  for (var i = 0; i < n; i++) {
   result.push(i);
  }
  return result;
};

var random_stuff = function(i) {
  switch(i % 10) {
    case 0:
      return i;
      break;
    case 1: