Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
execution-time
Advanced tools
node.js utility to measure execution time in code
npm install execution-time --save
const perf = require('execution-time')();
//at beginning of your code
perf.start();
//at end of your code
const results = perf.stop();
console.log(results.time); // in milliseconds
const perf = require('execution-time')();
//at beginning of your code, pass any name
perf.start('apiCall');
//at end of your code, pass the same name (anywhere in your flow)
const results = perf.stop('apiCall');
console.log(results.time); // in milliseconds
console.log(results.preciseWords); // in words
sample usage with debug
const debug = require('debug')('your-module');
const perf = require('execution-time')(debug);
//at beginning of your code
perf.start();
//at end of your code
perf.stop();
also works with console.log/info/warn
const perf = require('execution-time')(console.log);
//at beginning of your code
perf.start();
//at end of your code
perf.stop();
FAQs
ultility to measure execution time
The npm package execution-time receives a total of 40,452 weekly downloads. As such, execution-time popularity was classified as popular.
We found that execution-time demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.