sc_profiling#
Profiling and CPU/memory management functions.
- Highlights:
sc.profile()
: a line profilersc.cprofile()
: a function profilersc.benchmark()
: quickly check your computer’s performancesc.loadbalancer()
: very basic load balancersc.resourcemonitor()
: a monitor to kill processes that exceed memory or other limits
Classes
Function profiler, built off Python's built-in cProfile |
|
Trace all function calls. |
|
Asynchronously monitor resource (e.g. memory) usage and terminate the process if the specified threshold is exceeded. |
Functions
Checks how much memory the variable or variables in question use by dumping them to file. |
|
Measure actual memory usage, typically at different points throughout execution. |
|
Benchmark Python performance |
|
Alias to |
|
Takes a snapshot of current CPU usage via |
|
Takes a snapshot of current fraction of memory usage via |
|
Delay execution while CPU load is too high -- a very simple load balancer. |
|
Profile the line-by-line time required by a function. |
|
Profile the line-by-line memory required by a function. |
Exceptions
Custom exception for use with the |