kenenet 0.9.2__py3-none-any.whl → 0.9.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kenenet/__init__.py +19 -19
- {kenenet-0.9.2.dist-info → kenenet-0.9.3.dist-info}/METADATA +1 -1
- kenenet-0.9.3.dist-info/RECORD +5 -0
- kenenet-0.9.2.dist-info/RECORD +0 -5
- {kenenet-0.9.2.dist-info → kenenet-0.9.3.dist-info}/WHEEL +0 -0
- {kenenet-0.9.2.dist-info → kenenet-0.9.3.dist-info}/top_level.txt +0 -0
kenenet/__init__.py
CHANGED
@@ -356,31 +356,31 @@ def time_code(details=True, chunks=True, label=None):
|
|
356
356
|
sys.settrace(trace_function)
|
357
357
|
|
358
358
|
else:
|
359
|
+
|
360
|
+
sys.settrace(None)
|
361
|
+
context = _current_context
|
362
|
+
_current_context = None
|
363
|
+
_line_start_time = None
|
364
|
+
|
365
|
+
if not _timings[context]:
|
366
|
+
quick_print(f"No times recorded: {context}")
|
367
|
+
return
|
368
|
+
|
369
|
+
sorted_timings = sorted(_timings[context], key=lambda x: x[2], reverse=True)
|
359
370
|
if details:
|
360
|
-
sys.settrace(None)
|
361
|
-
context = _current_context
|
362
|
-
_current_context = None
|
363
|
-
_line_start_time = None
|
364
|
-
|
365
|
-
if not _timings[context]:
|
366
|
-
quick_print(f"No times recorded: {context}")
|
367
|
-
return
|
368
|
-
|
369
|
-
sorted_timings = sorted(_timings[context], key=lambda x: x[2], reverse=True)
|
370
|
-
|
371
371
|
quick_print(f"\nTime spent on each line: {context}")
|
372
372
|
quick_print("-" * 80)
|
373
373
|
quick_print(f"{'Line':>6} | {'Time':>12} | Code")
|
374
374
|
quick_print("-" * 80)
|
375
|
-
|
376
|
-
for lineno, line_content, elapsed in sorted_timings:
|
377
|
-
if line_content not in _ignore_line:
|
378
|
-
quick_print(f"{lineno:6d} | {elapsed:12.6f} | {line_content}")
|
379
|
-
|
380
|
-
quick_print("-" * 80)
|
381
|
-
total_time = sum(elapsed for _, _, elapsed in _timings[context])
|
382
|
-
quick_print(f"Total execution time: {total_time:.6f}")
|
383
375
|
|
376
|
+
for lineno, line_content, elapsed in sorted_timings:
|
377
|
+
if line_content not in _ignore_line and details:
|
378
|
+
quick_print(f"{lineno:6d} | {elapsed:12.6f} | {line_content}")
|
379
|
+
|
380
|
+
if details: quick_print("-" * 80)
|
381
|
+
total_time = sum(elapsed for _, _, elapsed in _timings[context])
|
382
|
+
if details: quick_print(f"Total execution time: {total_time:.6f}")
|
383
|
+
|
384
384
|
if _block_timings and chunks:
|
385
385
|
quick_print("\nTime spent on chunks of code:")
|
386
386
|
quick_print("-" * 80)
|
@@ -0,0 +1,5 @@
|
|
1
|
+
kenenet/__init__.py,sha256=aleghOWGKnH-vyEonTNmHXG0NA0JYkUJdgf8z0tm4BI,16527
|
2
|
+
kenenet-0.9.3.dist-info/METADATA,sha256=Sp1a2ePyDFKGk7UaPj7RNK8uem7SCATQgI7eRVw-FXI,633
|
3
|
+
kenenet-0.9.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4
|
+
kenenet-0.9.3.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
+
kenenet-0.9.3.dist-info/RECORD,,
|
kenenet-0.9.2.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
kenenet/__init__.py,sha256=OSA1tIx7og8oxbvVqp15kgqrda-yNy7qPb4ry8K7998,16571
|
2
|
-
kenenet-0.9.2.dist-info/METADATA,sha256=grsmoIIL7TyubyTHBQ_QG7HxMfIJPj0u5MmobDZdk1I,633
|
3
|
-
kenenet-0.9.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4
|
-
kenenet-0.9.2.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
-
kenenet-0.9.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|