Socket
Socket
Sign inDemoInstall

@tracerbench/trace-event

Package Overview
Dependencies
0
Maintainers
4
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tracerbench/trace-event

Chrome Trace Events interfaces


Version published
Maintainers
4
Install size
31.9 kB
Created

Changelog

Source

8.0.0 (2022-08-30)

  • Upgrade dependencies and node engine to 16.x (#434) (d557588), closes #434
  • chore(deps): bump cli-table3 from 0.6.0 to 0.6.2 (ebbbee0)
  • chore(deps): bump debug from 4.3.3 to 4.3.4 (84dabed)
  • chore(deps): bump ejs from 3.1.6 to 3.1.8 (47202d4)
  • chore(deps): bump json5 from 2.2.0 to 2.2.1 (0194ef2)
  • chore(deps): bump parse-url from 6.0.0 to 6.0.5 (50a3c55)
  • feat: add documentation link in cli readme (0cbf116)
  • feat: end recording trace at LCP if marker specifies (7e1ca9a)
  • feat: export cli apis (7f645b7)
  • feat: trace end at lcp (091aab5)
  • feat: use markers config to decide if end at lcp (3602a59)

Readme

Source

@tracerbench/trace-event

Typescript interfaces and constants enum for Chrome Devtools Protocol traces.

The Constants enum is a const enum so if you are compiling with tsc it will compile out.

Example

import type { MetadataTraceEvent, TraceEvent, TraceStreamJson } from '@tracerbench/trace-event';
import { Constants } from '@tracerbench/trace-event';
import { readFileSync } from 'fs';
const trace: TraceEvent[] | TraceStreamJson = JSON.parse(readFileSync('trace.json', 'utf8'));
const traceEvents = Array.isArray(trace) ? trace : trace.traceEvents;
traceEvents.sort((a, b) => a.ts - b.ts);
const metadata: MetadataTraceEvent[] = traceEvents.filter((event) => event.ph === Constants.TRACE_EVENT_PHASE_METADATA);

Keywords

FAQs

Last updated on 30 Aug 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc