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.
@grimen/totalrecall
Advanced tools
Readme
js-totalrecall
A runtime step profiler - for Node/JavaScript.
Aggregating runtime statistics and/or finding bottlenecks in code is one of the most common challenges as a software engineer. This is a library to aid that. In comparison to most existing libraries this one is focused on step profiling; aggregation of runtime information in steps marked by keys/tags/labels and optional meta data, which is used to create a summary of all steps in form of a transaction.
This is an MVP that most likely will be extended with more profiling features.
Install using npm:
$ npm install @grimen/totalrecall
Install using yarn:
$ yarn add @grimen/totalrecall
Very basic example:
const totalrecall = require('@grimen/totalrecall')
const sleep = (seconds = 0) => {
return new Promise((resolve) => {
setTimeout(resolve, seconds * 1000)
})
}
// ---------------------------------------------------
// EXAMPLE: runtime step profiler
// ------------------------------------------------
let profiler = totalrecall.timer('profile something - using timer', {
begin: false,
})
profiler.begin('task 1')
await sleep(0.1)
profiler.begin('task 2')
await sleep(0.2)
profiler.begin('task 3')
await sleep(0.3)
profiler.end()
console.log('[profiler.time / basic]: TIME:', profiler.time)
console.log('[profiler.time / basic]: STEPS:', profiler.steps)
// ---------------------------------------------------
// EXAMPLE: runtime step profiler (detailed)
// ------------------------------------------------
profiler = totalrecall.timer('profile something - using timer', {
begin: false,
enabled: true,
verbose: true,
colors: true,
})
profiler.begin('task 1')
await sleep(0.1)
profiler.begin('task 2')
await sleep(0.2)
profiler.begin('task 3')
await sleep(0.3)
profiler.end()
console.log('[profiler.time / detailed]: TIME:', profiler.time)
console.log('[profiler.time / detailed]: STEPS:', profiler.steps)
Clone down source code:
$ make install
Run colorful tests using jest:
$ make test
This project was mainly initiated - in lack of solid existing alternatives - to be used at our work at Markable.ai to have common code conventions between various programming environments where Node.js (for I/O heavy operations) is heavily used.
Thanks to op-bk for creative help with naming this library.
Released under the MIT license.
FAQs
A runtime step profiler - for Node/JavaScript.
The npm package @grimen/totalrecall receives a total of 4 weekly downloads. As such, @grimen/totalrecall popularity was classified as not popular.
We found that @grimen/totalrecall 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.