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
Format Spec:
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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for eventtracer_py-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c055997155b2c5facdf95a71fe88d99e192c32ee95e7f423492066bdfe457779 |
|
MD5 | 453ac6022a6a13e3c148df00e677d29d |
|
BLAKE2b-256 | dd5d5cb668309f12bdb44d3a72cfc3a4d19c16845148dee4d10eff0f0a7c76a1 |