Muscat.Helpers.Profiler module

CheckIntegrity(GUI: bool = False)[source]
class Profiler(discardedPortion: float = 0.2, timerSignificantDigits: int = 3)[source]

Bases: object

Class to help profiling code, this is a very simple approach. it uses cProfile and pstats to do all the work.

myProfiler = Profiler(0.2)

myProfiler.Start() #do some work time.sleep(0.02) print(“Hello”) a = 3 + 4

myProfiler.Stop() print(myProfiler)

Start() None[source]

Start the profiling

Stop() None[source]

Stop the profiling