A class to represent a Chronograph for timing code execution
| Parameters: |
|
|---|
The complete timing data of the last completed split.
| Returns: | (dict) |
|---|
The time elapsed for the last completed split.
| Returns: | (float) |
|---|
Prints a full report of timing data as a string.
Resets and clears all timing data.
Stops the current split and immediately starts a new split, perhaps with a new label.
| Parameters: | label – (str) a label to apply to this split (useful for reporting) |
|---|---|
| Returns: | (bool) if the split was created successfully (used internally) |
Starts timing a new split.
| Parameters: | label – (str) a label to apply to this split (useful for reporting) |
|---|
Stops timing.
All timing data.
| Returns: | (JSON array of dicts) |
|---|
The total elapsed time (all splits) for the Chronograph
| Returns: | (float) |
|---|
Bases: exceptions.Exception
A function decorator: each execution of the function will be timed as a separate split. By default the Chronograph name will be the function name.
| Parameters: | kwargs1 – (**kwargs1) parameters to feed into the Chronograph constructor |
|---|---|
| Returns: | (this is a function decorator) |
Get a chronograph and save it the global list of chronographs
| Parameters: |
|
|---|---|
| Returns: | a Chronograph object |