Socket
Socket
Sign inDemoInstall

brolly

Package Overview
Dependencies
227
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.5.0

12

bin/index.js

@@ -58,10 +58,14 @@ 'use strict';

p.then(result => {
console.log(`total ${time()}`);
console.log(`total ${time()}\n`);
result.forEach((obj, i) => {
if (obj.success) {
console.log(`${names[i]}: ${obj.result}ms (average)`);
const { avgExecTime, opsPerSec } = obj.result;
console.log(`- ${names[i]}:`);
console.log(` avg time: ${avgExecTime}ms`);
console.log(` ops/sec: ${opsPerSec}`);
} else {
console.log(`${names[i]}: failed (${obj.error})`);
console.log(`- ${names[i]}:`);
console.log(` failed (${obj.error})`);
}
console.log();
});

@@ -68,0 +72,0 @@ });

@@ -36,3 +36,4 @@ 'use strict';

let sum = 0;
const runTime = timer('s');
let execTime = 0;
let completed = 0;

@@ -50,6 +51,9 @@

cbCalled = true;
sum += time();
execTime += time();
if (++completed === iterations - 1) {
success(parseInt(sum / iterations));
success({
avgExecTime: parseInt(execTime / iterations),
opsPerSec: (iterations / runTime()).toLocaleString(undefined, { maximumFractionDigits: 0 })
});
}

@@ -56,0 +60,0 @@ };

{
"name": "brolly",
"version": "1.4.0",
"version": "1.5.0",
"description": "benchmark in style",

@@ -5,0 +5,0 @@ "main": "bin/index.js",

@@ -63,10 +63,14 @@ 'use strict'

p.then((result) => {
console.log(`total ${time()}`)
console.log(`total ${time()}\n`)
result.forEach((obj, i) => {
if (obj.success) {
console.log(`${names[i]}: ${obj.result}ms (average)`)
const {avgExecTime, opsPerSec} = obj.result
console.log(`- ${names[i]}:`)
console.log(` avg time: ${avgExecTime}ms`)
console.log(` ops/sec: ${opsPerSec}`)
} else {
console.log(`${names[i]}: failed (${obj.error})`)
console.log(`- ${names[i]}:`)
console.log(` failed (${obj.error})`)
}
console.log()
})

@@ -73,0 +77,0 @@ })

@@ -36,3 +36,4 @@ 'use strict'

let sum = 0
const runTime = timer('s')
let execTime = 0
let completed = 0

@@ -50,6 +51,9 @@

cbCalled = true
sum += time()
execTime += time()
if (++completed === iterations - 1) {
success(parseInt(sum / iterations))
success({
avgExecTime: parseInt(execTime / iterations),
opsPerSec: (iterations / runTime()).toLocaleString(undefined, {maximumFractionDigits: 0})
})
}

@@ -56,0 +60,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc