mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 05:30:17 +00:00
Update profiler output
This commit is contained in:
parent
421b5ef32e
commit
a91e67129e
@ -363,7 +363,6 @@ def profiler(tag=None, capture=False, super_tag=None):
|
|||||||
trace_exception(e)
|
trace_exception(e)
|
||||||
|
|
||||||
def profiler_results():
|
def profiler_results():
|
||||||
from rich.pretty import pprint
|
|
||||||
from statistics import mean, median, stdev
|
from statistics import mean, median, stdev
|
||||||
results = {}
|
results = {}
|
||||||
|
|
||||||
@ -410,11 +409,13 @@ def profiler_results():
|
|||||||
|
|
||||||
def print_tag_results(tag, level):
|
def print_tag_results(tag, level):
|
||||||
ind = " "*level
|
ind = " "*level
|
||||||
print(f"{ind}{tag["name"]}")
|
name = tag["name"]; count = tag["count"]
|
||||||
print(f"{ind} Samples : {tag["count"]}")
|
mean = tag["mean"]; tag["median"]; stdev = tag["stdev"]
|
||||||
print(f"{ind} Mean : {prettyshorttime(tag["mean"])}")
|
print(f"{ind}{name}")
|
||||||
print(f"{ind} Median : {prettyshorttime(tag["median"])}")
|
print(f"{ind} Samples : {count}")
|
||||||
print(f"{ind} St.dev. : {prettyshorttime(tag["stdev"])}")
|
print(f"{ind} Mean : {prettyshorttime(mean)}")
|
||||||
|
print(f"{ind} Median : {prettyshorttime(median)}")
|
||||||
|
print(f"{ind} St.dev. : {prettyshorttime(stdev)}")
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
print("\nProfiler results:\n")
|
print("\nProfiler results:\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user