Runs the profiler for `surround` steps around the next `log_steps`.
(sess, step=None, first_step=0,
log_steps=1, surround=20, **kw)
| 816 | |
| 817 | |
| 818 | def startstop_prof(sess, step=None, first_step=0, |
| 819 | log_steps=1, surround=20, **kw): |
| 820 | """Runs the profiler for `surround` steps around the next `log_steps`.""" |
| 821 | first_log = first_step + log_steps - (first_step % log_steps) |
| 822 | # don't start before first! |
| 823 | start = max(first_log - surround//2, first_step + 1) |
| 824 | return startstop_prof_at_steps(sess, step, start, start + surround, **kw) |
| 825 | |
| 826 | |
| 827 | def startstop_prof_at_steps( |
no test coverage detected