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

cronometro

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cronometro - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

4

CHANGELOG.md

@@ -0,3 +1,7 @@

### 2020-01-29 / 0.2.0
- fix: Improve scheduling to avoid races.
### 2020-01-29 / 0.1.0
- Initial version.

19

lib/index.js

@@ -9,2 +9,6 @@ 'use strict';

const print_1 = require("./print");
const debug = (process.env.NODE_DEBUG || '').includes('cronometro');
function schedule(operation) {
process.nextTick(operation);
}
function runIteration(context) {

@@ -15,3 +19,3 @@ function trackResults(error) {

context.results[context.current.name] = { success: false, error };
processQueue(context);
schedule(() => processQueue(context));
return;

@@ -39,8 +43,11 @@ }

};
processQueue(context);
schedule(() => processQueue(context));
return;
}
context.current.remaining--;
process.nextTick(() => runIteration(context));
schedule(() => runIteration(context));
}
if (debug) {
console.debug(`cronometro: Executing test ${context.current.name}, ${context.current.remaining} iterations to go`);
}
const start = process.hrtime.bigint();

@@ -59,3 +66,3 @@ try {

context.results[context.current.name] = { success: false, error };
processQueue(context);
schedule(() => processQueue(context));
}

@@ -77,3 +84,3 @@ }

};
process.nextTick(() => runIteration(testContext));
schedule(() => runIteration(testContext));
}

@@ -129,3 +136,3 @@ function cronometro(tests, options, callback) {

};
processQueue(context);
schedule(() => processQueue(context));
return promise;

@@ -132,0 +139,0 @@ }

{
"name": "cronometro",
"version": "0.1.0",
"version": "0.2.0",
"description": "Simple benchmarking suite powered by HDR histograms.",

@@ -5,0 +5,0 @@ "homepage": "https://sw.cowtech.it/cronometro",

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