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

webworker-threads

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webworker-threads - npm Package Compare versions

Comparing version 0.7.13 to 0.7.14

run-all-tests.sh

9

package.json
{
"name": "webworker-threads",
"version": "0.7.13",
"version": "0.7.14",
"main": "index.js",

@@ -38,7 +38,8 @@ "description": "Lightweight Web Worker API implementation with native threads",

"js": "env PATH=./node_modules/.bin:\"$PATH\" lsc -cj package.ls;\ngcc deps/minifier/src/minify.c -o deps/minifier/bin/minify;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/worker.ls > src/worker.js;\n./deps/minifier/bin/minify kWorker_js < src/worker.js > src/worker.js.c;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/events.ls > src/events.js;\n./deps/minifier/bin/minify kEvents_js < src/events.js > src/events.js.c;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/createPool.ls > src/createPool.js;\n./deps/minifier/bin/minify kCreatePool_js < src/createPool.js > src/createPool.js.c;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/thread_nextTick.ls > src/thread_nextTick.js;\n./deps/minifier/bin/minify kThread_nextTick_js 1 < src/thread_nextTick.js > src/thread_nextTick.js.c;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/load.ls > src/load.js;\n./deps/minifier/bin/minify kLoad_js 1 1 < src/load.js > src/load.js.c;",
"test": "node test-package.js"
"pretest": "npm run js && node-gyp rebuild",
"test": "./run-all-tests.sh"
},
"dependencies": {
"bindings": "^1.2.1",
"nan": "^2.4.0"
"bindings": "^1.3.0",
"nan": "^2.8.0"
},

@@ -45,0 +46,0 @@ "devDependencies": {

@@ -173,2 +173,2 @@ // Generated by LiveScript 1.5.0

return getPendingJobs;
}
}

@@ -54,2 +54,2 @@ // Generated by LiveScript 1.5.0

return this.dispatchEvents;
}
}

@@ -5,22 +5,34 @@

var MAX_THREADS = 1000;
var THREADS_PER_ITER = 5;
var i= 0;
var k= 5;
(function again () {
var j= k;
while (j--) {
T.create().destroy();
}
i+= k;
process.nextTick(again);
})();
var threadCount = 0; /* # of threads created so far. */
/* Indicate create/destroy rate. */
var reportFreqInMs = 5e2;
var t= Date.now();
function display () {
var e= Date.now()- t;
var tps= (i*1e3/e).toFixed(1);
process.stdout.write('\nt (ms) -> '+ e+ ', i -> '+ i+ ', created/destroyed-per-second -> '+ tps);
var tps= (threadCount*1e3/e).toFixed(1);
process.stdout.write('\nt (ms) -> '+ e+ ', threadCount -> '+ threadCount + ', created/destroyed-per-second -> '+ tps + '\n');
}
setInterval(display, 1e3);
var displayInterval = setInterval(display, reportFreqInMs);
/* Create and destroy MAX_THREADS threads. */
(function again () {
var i;
for (i = 0; i < THREADS_PER_ITER; i++) {
T.create().destroy();
}
threadCount += THREADS_PER_ITER;
if (threadCount < MAX_THREADS) {
setTimeout(again, 0);
}
else {
clearInterval(displayInterval);
display();
}
})();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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