Lines Matching refs:TS
28 class TS():
39 TS.inner_stack.append(time.time())
42 log.error("start TS exception.", is_traceback=True)
46 if TS.times == 0:
47 TS.times = 1
48 return ("%s ==> average: %.3f ms" % (prefix, TS.total / TS.times))
53 if len(TS.inner_stack) > 0:
54 cur_time = (time.time() - TS.inner_stack.pop()) * 1000
55 TS.total += cur_time
56 TS.times += 1
61 log.error("stop TS exception.", is_traceback=True)