Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

benchmarkify

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

benchmarkify - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

bench-results/multi.json

30

index.js
const _ = require("lodash");
const Promise = require("bluebird");
const path = require("path");
const fs = require("fs");
const mkdir = require("mkdirp");
const Promise = require("bluebird");
const chalk = require("chalk");

@@ -26,3 +29,4 @@ const Benchmark = require("benchmark");

async: false,
name: ""
name: "",
resultFile: null
});

@@ -102,2 +106,24 @@ this.suite = new Benchmark.Suite;

if (self.opts.resultFile) {
mkdir.sync(path.dirname(path.resolve(self.opts.resultFile)));
let content = {};
if (fs.existsSync(self.opts.resultFile)) {
try {
content = JSON.parse(fs.readFileSync(self.opts.resultFile));
} catch(e) {
// Ignored
}
}
content[self.opts.name] = tests.map(bench => ({
name: bench.name,
count: bench.hz
}));
content.timestamp = Date.now();
content.generated = new Date().toString();
fs.writeFileSync(self.opts.resultFile, JSON.stringify(content, null, 2));
}
resolve();

@@ -104,0 +130,0 @@ });

4

package.json
{
"name": "benchmarkify",
"version": "1.0.0",
"version": "1.1.0",
"description": "Benchmark runner for NodeJS",
"main": "index.js",
"scripts": {
"dev": "node examples"
},

@@ -20,4 +21,5 @@ "keywords": [

"lodash": "4.17.4",
"mkdirp": "0.5.1",
"ora": "1.1.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc