
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
chrome-trace-event
Advanced tools
A library to create a trace of your node app per Google's Trace Event format.
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.
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();
While not directly similar, speedline analyzes trace logs (like those generated by chrome-trace-event) to compute performance metrics and visual progress of web pages. It complements the output of chrome-trace-event by providing higher-level analysis tools.
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.
npm install chrome-trace-event
const Trace = require("chrome-trace-event").Tracer;
const trace = new Trace({
noStream: true
});
trace.pipe(fs.createWriteStream(outPath));
trace.flush();
MIT. See LICENSE.txt.
FAQs
A library to create a trace of your node app per Google's Trace Event format.
The npm package chrome-trace-event receives a total of 19,071,309 weekly downloads. As such, chrome-trace-event popularity was classified as popular.
We found that chrome-trace-event demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.