spacekit.analyzer.track
This module tracks the start, end clocktime intervals for a running process and record the total duration. Optionally the timestamps and durations for multiple processes can be logged in a single text file on disk (or separate files if desired).
- spacekit.analyzer.track.proc_time(start, end, prcname='')[source]
calculates total duration from start to end of a process that finished running.
- spacekit.analyzer.track.stopwatch(prcname, t0=None, t1=None, out='.', log=True, subset_name=None)[source]
Times a process from start to finish and (optionally) records the intervals and total duration in a text file on disk.
- Parameters:
prcname (str) – name of running process
t0 (int, optional) – time.time timestamp start interval, by default None
t1 (int, optional) – time.time timestamp end interval], by default None
out (str, optional) – location to save recorded clocktimes, by default “.”
log (bool, optional) – record process clocktimes in a text file on disk, by default True