
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Zero dependency tool to measure time spent in JavaScript code. You can start and stop each label many times, and profilator will internally save each time sample and present a complete report of where you spent your time.
npm install profilator
Start and stop each fraction of the code you want to measure and / or compare with other parts, with a label for each one:
const buildProfilator = require("profilator");
const profilator = buildProfilator("My big test"); // You can provide a name for the profilator instance
// or
const profilator = require("profilator")(); // if you intend to use only one
profilator.start("set-up");
// ... Any set-up related code
profilator.stop("set-up");
profilator.start("db tasks");
// ... Some code interacting with your DB
profilator.stop("db tasks");
profilator.start("io tasks");
// ... Maybe reading some files
profilator.stop("io tasks");
profilator.start("db tasks");
// ... Some more DB related code
profilator.stop("db tasks");
profilator.start("io tasks");
// ... And now maybe writing some files
profilator.stop("io tasks");
At any point in time you can check the total time spent for any given label, or all of them:
After all your samples are taken, you can get a report of where you spent all your time.
const resultsReport = profilator.buildResultsReport();
console.log(resultsReport);
This would print this report, ordered by time spent
# Profilator session: My big test
TOTAL TIME 1000 ms
db tasks 800 ms (80 %)
io tasks 130 ms (13 %)
set-up 70 ms (7 %)
Each line will display the first 20 characters of the label, any longer one will be truncated.
FAQs
Zero dependency tool to measure time spent in JavaScript code
The npm package profilator receives a total of 0 weekly downloads. As such, profilator popularity was classified as not popular.
We found that profilator 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.