Skip to content

monkeython/profiling

Repository files navigation

The purpose of this package is to provide both reasonable statistical and deterministic profiling to be used in running (multi-threading) production environment. Up to now, I'm just trying to prove the concept and this package is just in the pre-alpha stage.

Deterministic profiling design

The deterministic profiler is mainly an container of row profiling informations. Actual profiling is performed by any object implementing the same _lsprof.Profiler interface. Trough the provided decorators and context manager, developers can control what code they want to profile: information are stored into the container at the end of each single profile. Profiling and information storage must be thread and sub-call/recursion wise.

Statistical profiling design

Statistical profiling is performed using sys._current_frames. Both signal and thread based statistical profiling are provided for flexibility. Each profile is collected and serialized as soon as it's produced.

Profiling instrumentation/serialization

Both deterministic and statistical profiling can be enabled/disabled trough a class variable, and initially setup with environment variables. Whenever instructed so, a collector class can collect profiling information and serialize for later use. This way, developers can decide when/how to profile.

About

Deterministic and statistical profiling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages