Socket
Socket
Sign inDemoInstall

chrome-trace

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-trace

Chrome trace parser.


Version published
Maintainers
3
Created
Source

Chrome-trace

Build status

Analyze tracelogs from Chrome, from the command line or as a node.js library.

How to use

Command line

With node.js >= 8.9 and npm >= 5.3, use npx to run chrome-trace.

npx chrome-trace <trace file>

node.js

Install chrome-trace as a dependency.

npm i chrome-trace 

Pass a stream or a parsed JSON object to chrome-trace.

const { parseStream } = require('chrome-trace');

const stream = getReadableStream(); // e.g. stream from file or http response
const parsedTrace = parseStream(stream);

const mainThreadId = parsedTrace.mainThread;
const categories = parsedTrace.eventCategoryTime[mainThreadId];
console.log(categories);

Development

  • The format for trace-log events is described here.
  • A python parser for tracelogs is available from WPO Foundation.
  • Chrome-trace uses Ava for testing. Please run npm run test before submitting PRs.
  • Code formatting by Prettier. Please run npm run lint:fix before submitting PRs.
  • Optional verbose logging using the debug module.
  • Additional useful npm scripts are:
    • test:verbose for additional debug info
    • test:watch to rerun tests as changes are made
    • test:watch:verbose automatic testing, with debug output

Keywords

FAQs

Package last updated on 25 Apr 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc