From 11d0cd9f8c21590ab1401cf37058ee4a5406b024 Mon Sep 17 00:00:00 2001 From: trethaller Date: Thu, 5 Sep 2019 16:12:53 +0200 Subject: [PATCH] improve network stats formatting (#44) --- hxbit/NetworkStats.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hxbit/NetworkStats.hx b/hxbit/NetworkStats.hx index c2dbed8..ead082d 100644 --- a/hxbit/NetworkStats.hx +++ b/hxbit/NetworkStats.hx @@ -218,9 +218,9 @@ class NetworkStats { tot += p.bytes; if( print == null ) print = #if sys Sys.println #else function(str) trace(str) #end; - print("Network stats:"); + print("Stats\tClass name\tCount\tBytes\t%"); for( p in all ) - print(" "+p.cl.name+"." + p.name+" count = " + p.count + ", bytes = " + p.bytes+" "+(Std.int(p.bytes*1000.0/tot)/10)+"%"); + print("\t"+p.cl.name+"." + p.name+"\t" + p.count + "\t" + p.bytes + "\t" + (Std.int(p.bytes*1000.0/tot)/10)); } public function reset() {