@tracerbench/trace-event
    TypeScript icon, indicating that this package has built-in type declarations

    7.0.0 • Public • Published

    @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);

    Install

    npm i @tracerbench/trace-event

    DownloadsWeekly Downloads

    46,344

    Version

    7.0.0

    License

    BSD-2-Clause

    Unpacked Size

    32.7 kB

    Total Files

    18

    Last publish

    Collaborators

    • tsubomi
    • krisselden
    • lynchbomb
    • spham92