Skip to content

shish/eventtracer-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generating Data:

Install library

python3 -m pip install eventtracer-py

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/*

About

Event Tracing for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages