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

@bunchmark/core

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bunchmark/core - npm Package Compare versions

Comparing version 1.0.0-pre-11 to 1.0.0-pre-12

2

package.json
{
"name": "@bunchmark/core",
"version": "1.0.0-pre-11",
"version": "1.0.0-pre-12",
"description": "benchmarking lib",

@@ -5,0 +5,0 @@ "type": "module",

@@ -80,4 +80,3 @@ export { run };

break;
}
else {
} else {
N *= 2;

@@ -107,4 +106,3 @@ }

result.workspace.push(t);
if (keepChrono)
result.chronological.push(t);
if (keepChrono) result.chronological.push(t);
}

@@ -131,4 +129,3 @@

}
}
else {
} else {
if (i === calibrationRuns) {

@@ -143,2 +140,3 @@ // set the final iteration number for each task

for (const j in sh) {
console.log(Object.keys(sh[k]), sh[k].i)
yield { kind: "task", task: runOne(sh[j]), i: sh[j].i };

@@ -189,7 +187,8 @@ }

options.handle.pause = (mode = true) => {
if (mode !== state.run)
return;
if (mode !== state.run) return;
state.run = !mode;
if (state.run)
Promise.resolve().then(go).catch(reason => reject(reason));
if (state.run && !state.done) Promise.resolve().then(go).catch(reason => {
state.done = true
reject(reason)
});
};

@@ -207,47 +206,43 @@ options.handle.stop = () => { state.done = true; };

async function go() {
try {
/**
* $typedef IteratorResult<YieldTask | YieldTick, ReturnTick>
*/
let status;
do {
await delay(0);
try {
do {
status = runner.next();
if (!status.done && isTask(status)) await (status.value).task
else break
} while (true);
}
catch (e) {
if (isTask(status)) e.TaskIndex = status.value.i
reject(e);
state.done = true
return;
}
// appease TypeScript, this can't ever be null
if (status == null) throw new TypeError("Unexpected null")
if (!status.done) {
if (!isTick(status))
throw new TypeError("Unexpected YieldResult " + JSON.stringify(status.value));
runnerOptions.onTick?.({
i: status.value.i - 1,
reps: status.value.reps,
entries: tasks.map(t => t.result)
});
}
/**
* $typedef IteratorResult<YieldTask | YieldTick, ReturnTick>
*/
let status;
do {
await delay(0);
try {
do {
status = runner.next();
if (!status.done && isTask(status)) await (status.value).task
else break
} while (true);
}
catch (e) {
state.done = true
reject(e);
return;
}
// appease TypeScript, this can't ever be null
if (status == null) throw new TypeError("Unexpected null")
if (!status.done) {
if (!isTick(status)) throw new TypeError("Unexpected YieldResult " + JSON.stringify(status.value));
runnerOptions.onTick?.({
i: status.value.i - 1,
reps: status.value.reps,
entries: tasks.map(t => t.result)
});
}
} while (!status.done && state.run && !state.done);
if (status.done || state.done) fulfill({
i: status.value.i - 1,
reps: status.value.reps,
entries: tasks.map(t => t.result)
});
} catch(e) {
reject(e);
state.done = true
}
} while (!status.done && state.run && !state.done);
if (status.done || state.done) fulfill({
i: status.value.i - 1,
reps: status.value.reps,
entries: tasks.map(t => t.result)
});
}
Promise.resolve().then(go).catch(reason => reject(reason));
Promise.resolve().then(go).catch(reason => {
state.done = true
reject(reason)
});
return result
}
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