shish/eventtracer-php

An API to write JSON traces as used by the Chrome Trace Viewer

v2.1.0 2023-02-04 12:26 UTC

This package is auto-updated.

Last update: 2024-05-04 15:25:50 UTC


README

$et = EventTracer("myeventlog.json");

$et->begin("Eating Cake");
[...]
$et->end();

If filename isn't specified, then data will be buffered in-memory ($et->buffer) and can be written to disk in one go with $et->flush($filename).

Viewing Data:

Visit chrome://tracing

Load JSON file

Screenshot

Format Spec:

Google Doc

Uses the JSON Array Format because that's the one which can be appended to from multiple threads