How to use chrome-trace-event - 6 common examples

To help you get started, we’ve selected a few chrome-trace-event examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zeit / next.js / packages / next / build / profiler / profiler.js View on Github external
export const createTrace = outputPath => {
  const trace = new Tracer({
    noStream: true,
  })
  const profiler = new Profiler(inspector)
  if (/\/|\\/.test(outputPath)) {
    const dirPath = path.dirname(outputPath)
    mkdirp.sync(dirPath)
  }
  const fsStream = fs.createWriteStream(outputPath)

  let counter = 0

  trace.pipe(fsStream)
  // These are critical events that need to be inserted so that tools like
  // chrome dev tools can load the profile.
  trace.instantEvent({
    name: 'TracingStartedInPage',
github flaviuse / mern-authentication / client / node_modules / webpack / lib / debug / ProfilingPlugin.js View on Github external
const createTrace = outputPath => {
	const trace = new Tracer({
		noStream: true
	});
	const profiler = new Profiler(inspector);
	if (/\/|\\/.test(outputPath)) {
		const dirPath = path.dirname(outputPath);
		mkdirp.sync(dirPath);
	}
	const fsStream = fs.createWriteStream(outputPath);

	let counter = 0;

	trace.pipe(fsStream);
	// These are critical events that need to be inserted so that tools like
	// chrome dev tools can load the profile.
	trace.instantEvent({
		name: "TracingStartedInPage",
github johandb / svg-drawing-tool / node_modules / webpack / lib / debug / ProfilingPlugin.js View on Github external
const createTrace = outputPath => {
	const trace = new Tracer({
		noStream: true
	});
	const profiler = new Profiler(inspector);
	const fsStream = fs.createWriteStream(outputPath);

	let counter = 0;

	trace.pipe(fsStream);
	// These are critical events that need to be inserted so that tools like
	// chrome dev tools can load the profile.
	trace.instantEvent({
		name: "TracingStartedInPage",
		id: ++counter,
		cat: ["disabled-by-default-devtools.timeline"],
		args: {
			data: {
github weixin / Miaow / node_modules / webpack / lib / debug / ProfilingPlugin.js View on Github external
function createTrace(outputPath) {
	const trace = new Tracer({
		noStream: true
	});
	const profiler = new Profiler(inspector);
	const fsStream = fs.createWriteStream(outputPath);

	let counter = 0;

	trace.pipe(fsStream);
	// These are critical events that need to be inserted so that tools like
	// chrome dev tools can load the profile.
	trace.instantEvent({
		name: "TracingStartedInPage",
		id: ++counter,
		cat: ["disabled-by-default-devtools.timeline"],
		args: {
			data: {
github parcel-bundler / parcel / packages / core / workers / src / Trace.js View on Github external
constructor() {
    this.tracer = new Tracer();
    this.tid = 0;
    this.eventId = 0;
    this.init();
  }

chrome-trace-event

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

MIT
Latest version published 3 years ago

Package Health Score

68 / 100
Full package analysis

Popular chrome-trace-event functions