Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A Node.js application profiling tool.
Project Info | |
---|---|
License: | Apache-2.0 |
Build: | make |
Documentation: | http://bucharest-gold.github.io/genet/ |
Issue tracker: | https://github.com/bucharest-gold/genet/issues |
Engines: | Node.js 4.x, 6.x, 7.x |
This is a simple Node.js profiling tool. Use it like this. First add it to your project.
$ npm install genet -S
Then start profiling. Put this somewhere in your app. Probably near the start.
const Genet = require('genet');
const profile = new Genet();
profile.start();
When requiring the genet
module, the module exports the Genet
object's
constructor function.
// Genet is a constructor function
const Genet = require('genet');
var profile = new Genet();
new Genet(options)
Creates a new profiler. Several options are allowed.
options.profileName
{string} - The profile name provided to v8-profiler
.
Defaults to 'genet'
.options.outputFile
{string} - The output file name.
Defaults to ./prof-${Date.now()}.cpuprofile
.options.duration
{Number} - The number of milliseconds to run the profiler. Defaults to 5000.options.verbose
{boolean} - Determines how much log output you'll see. Defaults to false
.options.report
{boolean} - Whether or not to generate report output. Defaults to true
.options.flamegraph
{boolean} - Determines whether to generate a flamegraph .svg file.
Defaults to false
.options.filter
{RegExp|String} - An inclusive filter which determines what functions to
include in the reports based on comparison with the path and filename for a given function.Begins profiling the application. The profiler will run until options.duration
milliseconds
have elapsed, and then generate reports.
Stops profiling the application. If the profiler has already been stopped, this function
does nothing. If the profiler is still running, it cancels the timeout set by options.duration
and then stops the profiler. This function returns a promise that resolves when the
profiler has stopped.
By default, genet
will generate a report to the console, and to a file. Using the
flamegraph
option, you can also generate a flamegraph as an .svg
file.
Console output will look something like this.
The flamegraph SVG might look something like this.
Please read the contributing guide
FAQs
A node.js profiling tool
The npm package genet receives a total of 1 weekly downloads. As such, genet popularity was classified as not popular.
We found that genet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.