Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
debugging-timer
Advanced tools
Readme
Measure the duration of multiple parts of your code, then effortlessly print all the timer results at once to the console.
Sample output:
Loading file: 506 ms
Processing data: 858 ms
You will use three methods: timer.start('task name')
, timer.end('task name')
,
and timer.print()
to show the results in the console. The print()
method also
returns the results as string, so you can save it to some logs if you need.
const DebugTimer = require('debugging-timer');
let timer = new DebugTimer();
(async () => {
timer.start('Loading file');
// Let's pretend we are doing some work here:
await delay(500);
timer.end('Loading file');
timer.start('Processing data');
await delay(850);
timer.end('Processing data');
// Let's see the results!
timer.print();
// Prints:
// Loading file: 506 ms
// Processing data: 858 ms
})();
async function delay(ms) {
await new Promise(resolve => setTimeout(resolve, ms));
}
Welcome in the linked GitHub repository.
FAQs
Measure the execution time of multiple sections of your code, then effortlessly print all the timer results at once to the console.
The npm package debugging-timer receives a total of 12 weekly downloads. As such, debugging-timer popularity was classified as not popular.
We found that debugging-timer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.