MCPcopy Index your code
hub / github.com/ipython/ipython / timings

Function timings

IPython/utils/timing.py:114–126  ·  view source on GitHub ↗

timings(reps,func,*args,**kw) -> (t_total,t_per_call) Execute a function reps times, return a tuple with the elapsed total CPU time in seconds and the time per call. These are just the first two values in timings_out().

(
    reps: int,
    func: Callable[..., Any],
    *args: Any,
    **kw: Any,
)

Source from the content-addressed store, hash-verified

112
113
114def timings(
115 reps: int,
116 func: Callable[..., Any],
117 *args: Any,
118 **kw: Any,
119) -> tuple[float, float]:
120 """timings(reps,func,*args,**kw) -> (t_total,t_per_call)
121
122 Execute a function reps times, return a tuple with the elapsed total CPU
123 time in seconds and the time per call. These are just the first two values
124 in timings_out()."""
125
126 return timings_out(reps,func,*args,**kw)[0:2]
127
128
129def timing(func: Callable[..., Any], *args: Any, **kw: Any) -> float:

Callers

nothing calls this directly

Calls 1

timings_outFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…