Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created

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

Keywords

FAQs

Package last updated on 08 Apr 2021

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