Metadata-Version: 2.1
Name: eventtracer-py
Version: 0.0.2
Summary: A library for tracing code into the chrome Event Trace format
Home-page: https://github.com/shish/eventtracer-py
Author: Shish
Author-email: webmaster@shishnet.org
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

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](.github/readme/trace.png)


Format Spec:
------------
[Google Doc](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/edit)

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


