New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

plotly-njstrace

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plotly-njstrace

output njstrace logs to plotly graphs

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

njstrace + plotly

quick and dirty visualization of node.js function tracing.

Plugin (formatter) for njstrace

This formatter will output a bar chart with each bar representing the time spent in each function. Functions are labelled with the file they were called from.

###Usage

var PlotlyFormatter = require('plotly-njstrace');

var traceOptions = { 
	formatter: new PlotlyFormatter('username', 'apiKey', 'graph name', 5000) 
};

// Call inject and use plotly formatter in opts
var njstrace = require('njstrace').inject(traceOptions);

var Brou = require('./examples/brouhaha.js');
var brou = new Brou();

// Do some stuff on "b"
setInterval(function run(){
    brou.haha(1000);
    brou.hehe(10000);
    brou.hoho(1000);
    brou.teehee(1000000);
    brou.hahaha(10000);
    brou.hihihi(1000);
}, 1000);

Outputs

Click here for the interactive graph. Output

PlotlyFormatter(username, apiKey, graphName, interval, layout)

  • username is your Plotly username
  • apiKey is your Plotly api key
  • graphName is your desired graph name
  • interval is the frequency to post your data to plotly (default 5s)
  • layout optional is a Plotly layout object (default used if none specified)

Installation

npm install njstrace-plotly-formatter

FAQs

Package last updated on 13 Sep 2014

Did you know?

Socket

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.

Install

Related posts