A tracker of elapsed time
| Param: | log_level: level at which to report elapsed times (default=’debug’) |
|---|
| Param: | log_level: level at which to report elapsed times (default=’debug’) |
|---|
Methods
| __init__([log_level]) |
|
||
| append(item) | Appends the item to the times array | ||
| log_error(error[, message]) | Logs the error in bold red | ||
| percentile(percentile) | calculates the percentile (e.g. 50 gets the median (the 50% item)) |
Attributes
| log | The logger method indicated by the log_level | ||
| logger |
|
Appends the item to the times array
| Param: |
|
|---|---|
| Postcondition: | self.times contains item |
Logs the error in bold red
| Param: |
|
|---|
Outputs to the log the most recent elapsed time information
| Param: |
|
|---|
calculates the percentile (e.g. 50 gets the median (the 50% item))
| Returns: | value for percintile of self.times as a timedelta |
|---|
The logger method indicated by the log_level
| Returns: | logger.debug or logger.info |
|---|
| Returns: | A logging object. |
|---|
collection of elapsed times