New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

benchmarko

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

benchmarko - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

13

CHANGELOG.md

@@ -5,3 +5,16 @@ # Change Log

<a name="0.0.2"></a>
## [0.0.2](https://github.com/unlight/benchmarko/compare/v0.0.1...v0.0.2) (2017-11-20)
### Bug Fixes
* **errors:** Print errors ([0fab44b](https://github.com/unlight/benchmarko/commit/0fab44b))
* **suite:** Added file name ([1a02bdd](https://github.com/unlight/benchmarko/commit/1a02bdd))
* **suite:** Added file name ([e5d385a](https://github.com/unlight/benchmarko/commit/e5d385a))
<a name="0.0.1"></a>
## 0.0.1 (2017-11-19)
* First release

13

lib/bin.js

@@ -0,3 +1,5 @@

#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const index_1 = require("./index");

@@ -23,3 +25,10 @@ const { version } = require('../package.json');

.argv;
index_1.main(argv);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Jpbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLG1DQUErQjtBQUMvQixNQUFNLEVBQUUsT0FBTyxFQUFFLEdBQUcsT0FBTyxDQUFDLGlCQUFpQixDQUFDLENBQUM7QUFFL0MsTUFBTSxJQUFJLEdBQUcsT0FBTyxDQUFDLE9BQU8sQ0FBQztLQUN4QixLQUFLLENBQUMsNENBQTRDLENBQUM7S0FFbkQsTUFBTSxDQUFDLEdBQUcsRUFBRTtJQUNULEtBQUssRUFBRSxNQUFNO0lBQ2IsUUFBUSxFQUFFLHlDQUF5QztDQUN0RCxDQUFDO0tBQ0QsT0FBTyxDQUFDLEdBQUcsQ0FBQztLQUNaLE1BQU0sQ0FBQyxHQUFHLEVBQUU7SUFDVCxLQUFLLEVBQUUsV0FBVztJQUNsQixRQUFRLEVBQUUsV0FBVztJQUNyQixPQUFPLEVBQUUsQ0FBQyxNQUFNLEVBQUUsUUFBUSxDQUFDO0NBQzlCLENBQUM7S0FDRCxLQUFLLENBQUMsV0FBVyxDQUFDO0tBQ2xCLElBQUksQ0FBQyxHQUFHLENBQUM7S0FDVCxLQUFLLENBQUMsR0FBRyxFQUFFLE1BQU0sQ0FBQztLQUNsQixPQUFPLENBQUMsT0FBTyxDQUFDO0tBQ2hCLEtBQUssQ0FBQyxHQUFHLEVBQUUsU0FBUyxDQUFDO0tBQ3JCLElBQUksQ0FBQztBQUVWLFlBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyJ9
(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
try {
yield index_1.main(argv);
}
catch (err) {
console.error(err); // eslint-disable-line no-console
}
}))();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Jpbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQ0EsbUNBQStCO0FBQy9CLE1BQU0sRUFBRSxPQUFPLEVBQUUsR0FBRyxPQUFPLENBQUMsaUJBQWlCLENBQUMsQ0FBQztBQUUvQyxNQUFNLElBQUksR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDO0tBQ3hCLEtBQUssQ0FBQyw0Q0FBNEMsQ0FBQztLQUVuRCxNQUFNLENBQUMsR0FBRyxFQUFFO0lBQ1QsS0FBSyxFQUFFLE1BQU07SUFDYixRQUFRLEVBQUUseUNBQXlDO0NBQ3RELENBQUM7S0FDRCxPQUFPLENBQUMsR0FBRyxDQUFDO0tBQ1osTUFBTSxDQUFDLEdBQUcsRUFBRTtJQUNULEtBQUssRUFBRSxXQUFXO0lBQ2xCLFFBQVEsRUFBRSxXQUFXO0lBQ3JCLE9BQU8sRUFBRSxDQUFDLE1BQU0sRUFBRSxRQUFRLENBQUM7Q0FDOUIsQ0FBQztLQUNELEtBQUssQ0FBQyxXQUFXLENBQUM7S0FDbEIsSUFBSSxDQUFDLEdBQUcsQ0FBQztLQUNULEtBQUssQ0FBQyxHQUFHLEVBQUUsTUFBTSxDQUFDO0tBQ2xCLE9BQU8sQ0FBQyxPQUFPLENBQUM7S0FDaEIsS0FBSyxDQUFDLEdBQUcsRUFBRSxTQUFTLENBQUM7S0FDckIsSUFBSSxDQUFDO0FBRVYsQ0FBQyxHQUFTLEVBQUU7SUFDUixJQUFJLENBQUM7UUFDRCxNQUFNLFlBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNyQixDQUFDO0lBQUMsS0FBSyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztRQUNYLE9BQU8sQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxpQ0FBaUM7SUFDekQsQ0FBQztBQUNMLENBQUMsQ0FBQSxDQUFDLEVBQUUsQ0FBQyJ9

19

lib/index.js

@@ -14,3 +14,3 @@ "use strict";

const benchmark = new Benchmarkify(name);
const suite = benchmark.createSuite(name);
const suite = benchmark.createSuite(`${name}, ${file}`);
sandboxes.map(sandbox => {

@@ -24,12 +24,13 @@ let name = sandbox.revision;

});
const [test] = suite.tests.slice(-1);
test.reference = true;
suite
.run()
.then((results) => {
// console.log("results", results);
});
const [referenceTest] = suite.tests.slice(-1);
referenceTest.reference = true;
const [headTest] = suite.tests.slice(0, 1);
const results = yield suite.run();
const stat = headTest.stat;
if (stat.percent <= 0 && (-stat.percent) > 10) {
throw new Error(`Performance hit ${(-stat.percent).toFixed(2)}%`);
}
});
}
exports.main = main;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2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DQUFDLENBQUM7UUFDM0MsTUFBTSxPQUFPLEdBQWMsTUFBTSxLQUFLLENBQUMsR0FBRyxFQUFFLENBQUM7UUFDN0MsTUFBTSxJQUFJLEdBQVUsUUFBUSxDQUFDLElBQUksQ0FBQztRQUNsQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDNUMsTUFBTSxJQUFJLEtBQUssQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ3RFLENBQUM7SUFDTCxDQUFDO0NBQUE7QUF4QkQsb0JBd0JDIn0=
{
"name": "benchmarko",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",

@@ -70,3 +70,3 @@ "description": "Run benchmark between revisions",

"keywords": [
"starter"
"benchmark"
],

@@ -73,0 +73,0 @@ "config": {

@@ -25,1 +25,8 @@ # benchmarko

See changes in [CHANGELOG.md](CHANGELOG.md) file.
TODO
---
* Setting threshold
* Skip error throw
* Attach by reflect metadata
* --tags

@@ -0,1 +1,2 @@

#!/usr/bin/env node
import { main } from './index';

@@ -24,2 +25,8 @@ const { version } = require('../package.json');

main(argv);
(async () => {
try {
await main(argv);
} catch (err) {
console.error(err); // eslint-disable-line no-console
}
})();
import { sandbox } from './sandbox';
import { RunResult } from './benchmarkify';
import { RunResult, IStat } from './benchmarkify';
const Benchmarkify = require('benchmarkify');

@@ -17,3 +17,3 @@

const benchmark = new Benchmarkify(name);
const suite = benchmark.createSuite(name);
const suite = benchmark.createSuite(`${name}, ${file}`);
sandboxes.map(sandbox => {

@@ -27,9 +27,10 @@ let name = sandbox.revision;

});
const [test] = suite.tests.slice(-1);
test.reference = true;
suite
.run()
.then((results: RunResult) => {
// console.log("results", results);
});
const [referenceTest] = suite.tests.slice(-1);
referenceTest.reference = true;
const [headTest] = suite.tests.slice(0, 1);
const results: RunResult = await suite.run();
const stat: IStat = headTest.stat;
if (stat.percent <= 0 && (-stat.percent) > 10) {
throw new Error(`Performance hit ${(-stat.percent).toFixed(2)}%`);
}
}
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