Skip to main content

A library for tracing code into the chrome Event Trace format

Project description

Generating Data:

Create tracer

from eventtracer import EventTracer
et = EventTracer("myeventlog.json")

Procedural API

et.begin("Eating Cake")
...
et.end()

Decorator API

@et.decorator
def foo():
    ...

foo()

Context Manager API

with et.context("doing stuff"):
    ...

Profiler API

et.set_profile(True)

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

Packaging Howto:

Because I forget every time I need to do this...

vim setup.py  # change version
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eventtracer-py-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

eventtracer_py-0.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file eventtracer-py-0.0.2.tar.gz.

File metadata

  • Download URL: eventtracer-py-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.5

File hashes

Hashes for eventtracer-py-0.0.2.tar.gz
Algorithm Hash digest
SHA256 58496758a4933ae157bcd854b43c2288e2971f9700c3f22eeebe7506f1a05ee9
MD5 98731ea16d1c9627673571f76f089777
BLAKE2b-256 48f279be1e1c3c74d2cfb6f88062c205e07501be370d0e57fa43cdf2b9599811

See more details on using hashes here.

File details

Details for the file eventtracer_py-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: eventtracer_py-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.5

File hashes

Hashes for eventtracer_py-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c055997155b2c5facdf95a71fe88d99e192c32ee95e7f423492066bdfe457779
MD5 453ac6022a6a13e3c148df00e677d29d
BLAKE2b-256 dd5d5cb668309f12bdb44d3a72cfc3a4d19c16845148dee4d10eff0f0a7c76a1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page