开发者社区> 镜像站> NPM> traceviewify
traceviewify
Converts .cpuprofile format to trace viewer JSON object format to allow analysing the data in chrome://tracing.
Last updated 6 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install traceviewify 
SYNC missed versions from official npm registry.

traceviewify build status

testling badge

Converts .cpuprofile format to trace viewer JSON object format to allow analysing the data in chrome://tracing.

var traceviewify = require('traceviewify');
var cpuprofile = require('./fixtures/fibonacci.cpuprofile');

var traceviewObjectFormat = traceviewify(cpuprofile); 

Screenshots

screenshot

The screenshot above shows chrome://tracing timeline and sunburst of traceviewified data

screenshot

The screenshot above shows DevTools with .cpuprofile from which the traceview was generated

Usage

cat some.cpuprofile | traceviewify > trace.json

Then load it into chrome://tracing.

Installation

npm install traceviewify

DTrace

A simple DTrace script was also added which generates trace viewer events. The resulting JSON can be directly imported into chrome://tracing.

API

traceviewify(cpuprofile, opts) → {Object}

Converts given cpuprofile object to a trace viewer JSON object.

Parameters:
Name Type Argument Description
cpuprofile Object

as produced by Chrome DevTools or cpuprofilify

opts Object <optional>
Properties
Name Type Description
pid number

sets process id

tid number

sets thread id

cpu number

sets CPU number

Source:
Returns:

trace viewer JSON object

Type
Object

generated with docme

License

MIT

Current Tags

  • 0.4.0                                ...           latest (6 years ago)

4 Versions

  • 0.4.0                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (2)