tottime
tottime is a profiling metric commonly used in program profilers, notably Python’s cProfile and the pstats module. It denotes the total time spent executing the code of a specific function itself, excluding time spent in functions that it calls (subcalls). The value is typically reported in seconds and is often shown alongside other columns such as ncalls (number of calls), percall (tottime divided by ncalls), and cumtime (cumulative time including subcalls).
Interpreting tottime helps identify functions that are intrinsically expensive: a high tottime indicates that the body
Limitations of tottime include measurement overhead and granularity: deterministic profilers add instrumentation cost, and built-in or