How to use the benchmark.map 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 lopatin / SnakeTron / old / public / libs / handlebars / bench / benchwarmer.js View on Github external
startLine: function(name) {
    var winners = Benchmark.map(this.winners(this.currentBenches), function(bench) {
      return bench.name.split(": ")[1];
    });

    this.currentBenches = [];

    print(winners.join(", "));
    print("\n");
    var padding = this.nameSize - name.length + 1;
    name = name + new Array(padding).join(" ");
    print(name);
  },
  writeBench: function(bench) {
github librenms / librenms / lib / handlebars / bench / util / benchwarmer.js View on Github external
startLine: function(name) {
    var winners = Benchmark.map(this.winners(this.currentBenches), function(bench) {
      return bench.name.split(": ")[1];
    });

    this.currentBenches = [];

    print(winners.join(", "));
    print("\n");

    if (name) {
      this.writeValue(name);
    }
  },
  writeBench: function(bench) {
github wycats / handlebars.js / bench / util / benchwarmer.js View on Github external
startLine: function(name) {
    var winners = Benchmark.map(this.winners(this.currentBenches), function(
      bench
    ) {
      return bench.name.split(': ')[1];
    });

    this.currentBenches = [];

    print(winners.join(', '));
    print('\n');

    if (name) {
      this.writeValue(name);
    }
  },
  writeBench: function(bench) {