You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

chrome-trace-event

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-trace-event

A library to create a trace of your node app per Google's Trace Event format.


Version published
Weekly downloads
16M
decreased by-19.28%
Maintainers
2
Install size
9.58 kB
Created
Weekly downloads
 

Package description

What is chrome-trace-event?

The chrome-trace-event npm package provides tools for creating and managing trace events in the format used by Chrome's tracing infrastructure. This is useful for developers who need to analyze performance issues or understand the behavior of their applications in a detailed and visual way.

What are chrome-trace-event's main functionalities?

Creating trace events

This feature allows developers to create instant trace events. The events are timestamped and can include additional arguments for more detailed analysis.

const tracer = require('chrome-trace-event').Tracer;
const trace = new tracer({ noStream: true });

trace.instantEvent({ name: 'myEvent', id: 1, args: { someDetail: 'detailValue' } });
trace.close();

Streaming trace events

This feature supports streaming trace events directly to a file or any writable stream, which is useful for capturing longer trace sessions without consuming too much memory.

const tracer = require('chrome-trace-event').Tracer;
const fs = require('fs');
const traceStream = fs.createWriteStream('trace.json');
const trace = new tracer({ stream: traceStream });

trace.instantEvent({ name: 'streamedEvent', id: 2 });
trace.close();

Other packages similar to chrome-trace-event

Readme

Source

Build Status

chrome-trace-event: A node library for creating trace event logs of program execution according to Google's Trace Event format. These logs can then be visualized with trace-viewer or chrome devtools to grok one's programs.

Install

npm install chrome-trace-event

Usage

const Trace = require("chrome-trace-event").Tracer;
const trace = new Trace({
    noStream: true
});
trace.pipe(fs.createWriteStream(outPath));
trace.flush();

License

MIT. See LICENSE.txt.

Keywords

FAQs

Package last updated on 29 May 2024

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc