Index: libcfa/src/concurrency/stats.cfa
===================================================================
--- libcfa/src/concurrency/stats.cfa	(revision 50f6afb777a2a99adaa5c5a1c12c05fea3ddc2c4)
+++ libcfa/src/concurrency/stats.cfa	(revision 986cb99435d178f4b220a3a48062591a4d88fe7c)
@@ -7,4 +7,5 @@
 #include "bits/locks.hfa"
 #include "stats.hfa"
+#include "strstream.hfa"
 
 #if !defined(__CFA_NO_STATISTICS__)
@@ -118,75 +119,72 @@
 	}
 
+	#define eng3(X) (ws(3, 3, unit(eng( X ))))
+
 	void __print_stats( struct __stats_t * stats, int flags, const char * type, const char * name, void * id ) with( *stats ) {
 
+		char buf[1024];
+		strstream sstr = { buf, 1024 };
+
 		if( flags & CFA_STATS_READY_Q ) {
-			double push_len = ((double)ready.push.local.attempt + ready.push.share.attempt + ready.push.extrn.attempt) / (ready.push.local.success + ready.push.share.success + ready.push.extrn.success);
+
+			sstr | "----- " | type | "\"" | name | "\" (" | "" | id | "" | ") - Ready Q Stats -----";
+
+			uint64_t totalR = ready.pop.local.success + ready.pop.help.success + ready.pop.steal.success + ready.pop.search.success;
+			uint64_t totalS = ready.push.local.success + ready.push.share.success + ready.push.extrn.success;
+			sstr | "- totals   : " | eng3(totalR) | "run," | eng3(totalS) | "schd (" | eng3(ready.push.extrn.success) | "ext," | eng3(ready.threads.migration) | "mig)";
+
+			double push_len = ((double)ready.push.local.attempt + ready.push.share.attempt + ready.push.extrn.attempt) / totalS;
 			double sLcl_len = ready.push.local.success ? ((double)ready.push.local.attempt) / ready.push.local.success : 0;
 			double sOth_len = ready.push.share.success ? ((double)ready.push.share.attempt) / ready.push.share.success : 0;
 			double sExt_len = ready.push.extrn.success ? ((double)ready.push.extrn.attempt) / ready.push.extrn.success : 0;
-
-			uint64_t total = ready.pop.local.success + ready.pop.help.success + ready.pop.steal.success + ready.pop.search.success;
-			double rLcl_pc = (100.0 * (double)ready.pop.local .success) / total;
-			double rHlp_pc = (100.0 * (double)ready.pop.help  .success) / total;
-			double rStl_pc = (100.0 * (double)ready.pop.steal .success) / total;
-			double rSch_pc = (100.0 * (double)ready.pop.search.success) / total;
-
-			__cfaabi_bits_print_safe( STDOUT_FILENO,
-				"----- %s \"%s\" (%p) - Ready Q Stats -----\n"
-				"- totals   : %'3" PRIu64 " run, %'3" PRIu64 " schd (%'" PRIu64 "ext, %'" PRIu64 "mig, %'" PRId64 " )\n"
-				"- push avg : %'3.0lf (l: %'3.2lf/%'" PRIu64 ", s: %'3.2lf/%'" PRIu64 ", e: %'3.2lf : %'" PRIu64 "e)\n"
-				"- local    : %'3.0lf%%: %'3" PRIu64 " (%'3" PRIu64 " try, %'3" PRIu64 " spc, %'3" PRIu64 " lck, %'3" PRIu64 " ept)\n"
-				"- help     : %'3.0lf%%: %'3" PRIu64 " (%'3" PRIu64 " try, %'3" PRIu64 " spc, %'3" PRIu64 " lck, %'3" PRIu64 " ept)\n"
-				"- steal    : %'3.0lf%%: %'3" PRIu64 " (%'3" PRIu64 " try, %'3" PRIu64 " spc, %'3" PRIu64 " lck, %'3" PRIu64 " ept)\n"
-				"- search   : %'3.0lf%%: %'3" PRIu64 " (%'3" PRIu64 " try, %'3" PRIu64 " spc, %'3" PRIu64 " lck, %'3" PRIu64 " ept)\n"
-				"- Idle Slp : %'3" PRIu64 "h, %'3" PRIu64 "c, %'3" PRIu64 "w, %'3" PRIu64 "e\n"
-				"\n"
-				, type, name, id
-				, total
-				, ready.push.local.success + ready.push.share.success + ready.push.extrn.success
-				, ready.push.extrn.success, ready.threads.migration, ready.threads.threads
-				, push_len, sLcl_len, ready.push.local.attempt, sOth_len, ready.push.share.attempt, sExt_len, ready.push.extrn.attempt
-				, rLcl_pc, ready.pop.local .success, ready.pop.local .attempt, ready.pop.local .espec, ready.pop.local .elock, ready.pop.local .eempty
-				, rHlp_pc, ready.pop.help  .success, ready.pop.help  .attempt, ready.pop.help  .espec, ready.pop.help  .elock, ready.pop.help  .eempty
-				, rStl_pc, ready.pop.steal .success, ready.pop.steal .attempt, ready.pop.steal .espec, ready.pop.steal .elock, ready.pop.steal .eempty
-				, rSch_pc, ready.pop.search.success, ready.pop.search.attempt, ready.pop.search.espec, ready.pop.search.elock, ready.pop.search.eempty
-				, ready.sleep.halts, ready.sleep.cancels, ready.sleep.wakes, ready.sleep.exits
-			);
+			sstr | "- push avg : " | ws(3, 3, push_len)
+			     | "- l: " | eng3(ready.push.local.attempt) | " (" | ws(3, 3, sLcl_len) | ")"
+			     | ", s: " | eng3(ready.push.share.attempt) | " (" | ws(3, 3, sOth_len) | ")"
+			     | ", e: " | eng3(ready.push.extrn.attempt) | " (" | ws(3, 3, sExt_len) | ")";
+
+			double rLcl_pc = (100.0 * (double)ready.pop.local .success) / totalR;
+			sstr | "- local    : " | eng3(ready.pop.local .success) | "-"| ws(3, 3, rLcl_pc) | '%'
+			     | " (" | eng3(ready.pop.local .attempt) | " try," | eng3(ready.pop.local .espec) | " spc," | eng3(ready.pop.local .elock) | " lck," | eng3(ready.pop.local .eempty) | " ept)";
+			double rHlp_pc = (100.0 * (double)ready.pop.help  .success) / totalR;
+			sstr | "- help     : " | eng3(ready.pop.help  .success) | "-"| ws(3, 3, rHlp_pc) | '%'
+			     | " (" | eng3(ready.pop.help  .attempt) | " try," | eng3(ready.pop.help  .espec) | " spc," | eng3(ready.pop.help  .elock) | " lck," | eng3(ready.pop.help  .eempty) | " ept)";
+			double rStl_pc = (100.0 * (double)ready.pop.steal .success) / totalR;
+			sstr | "- steal    : " | eng3(ready.pop.steal .success) | "-"| ws(3, 3, rStl_pc) | '%'
+			     | " (" | eng3(ready.pop.steal .attempt) | " try," | eng3(ready.pop.steal .espec) | " spc," | eng3(ready.pop.steal .elock) | " lck," | eng3(ready.pop.steal .eempty) | " ept)";
+			double rSch_pc = (100.0 * (double)ready.pop.search.success) / totalR;
+			sstr | "- search   : " | eng3(ready.pop.search.success) | "-"| ws(3, 3, rSch_pc) | '%'
+			     | " (" | eng3(ready.pop.search.attempt) | " try," | eng3(ready.pop.search.espec) | " spc," | eng3(ready.pop.search.elock) | " lck," | eng3(ready.pop.search.eempty) | " ept)";
+
+			sstr | "- Idle Slp : " | eng3(ready.sleep.halts) | "halt," | eng3(ready.sleep.cancels) | "cancel," | eng3(ready.sleep.wakes) | "wake," | eng3(ready.sleep.exits) | "exit";
+			sstr | nl;
 		}
 
 		#if defined(CFA_HAVE_LINUX_IO_URING_H)
 			if( flags & CFA_STATS_IO ) {
+				sstr | "----- " | type | "\"" | name | "\" (" | "" | id | "" | ") - I/O Stats -----";
+
 				uint64_t total_allocs = io.alloc.fast + io.alloc.slow;
-				double avgfasta = ((double)io.alloc.fast) / total_allocs;
+				double avgfasta = (100.0 * (double)io.alloc.fast) / total_allocs;
+				sstr | "- total allocations : " | eng3(io.alloc.fast) | "fast," | eng3(io.alloc.slow) | "slow (" | ws(3, 3, avgfasta) | "%)";
+				sstr | "-     failures      : " | eng3(io.alloc.fail) | "oom, " | eng3(io.alloc.revoke) | "rvk, " | eng3(io.alloc.block) | "blk";
 
 				uint64_t total_submits = io.submit.fast + io.submit.slow;
-				double avgfasts = ((double)io.submit.fast) / total_submits;
+				double avgfasts = (100.0 * (double)io.submit.fast) / total_submits;
+				sstr | "- total submits     : " | eng3(io.submit.fast) | "fast," | eng3(io.submit.slow) | "slow (" | ws(3, 3, avgfasts) | "%)";
+				sstr | "- flush external    : " | eng3(io.flush.external);
+
+				sstr | "- io_uring_enter    : " | eng3(io.calls.flush) | " (" | eng3(io.calls.drain) | ", " | eng3(io.calls.errors.busy) | " EBUSY)";
 
 				double avgsubs = ((double)io.calls.submitted) / io.calls.flush;
 				double avgcomp = ((double)io.calls.completed) / io.calls.drain;
-
-				__cfaabi_bits_print_safe( STDOUT_FILENO,
-					"----- %s \"%s\" (%p) - I/O Stats -----\n"
-					"- total allocations : %'" PRIu64 "f, %'" PRIu64 "s (%'2.2lff) \n"
-					"-     failures      : %'" PRIu64 "oom, %'" PRIu64 "rvk, %'" PRIu64 "blk\n"
-					"- total submits     : %'" PRIu64 "f, %'" PRIu64 "s (%'2.2lf) \n"
-					"- flush external    : %'" PRIu64 "\n"
-					"- io_uring_enter    : %'" PRIu64 " (%'" PRIu64 ", %'" PRIu64 " EBUSY)\n"
-					"-     submits       : %'" PRIu64 " (%'.2lf) \n"
-					"-     completes     : %'" PRIu64 " (%'.2lf) \n"
-					"- poller sleeping   : %'" PRIu64 "\n"
-					"\n"
-					, type,  name, id
-					, io.alloc.fast, io.alloc.slow, avgfasta
-					, io.alloc.fail, io.alloc.revoke, io.alloc.block
-					, io.submit.fast, io.submit.slow, avgfasts
-					, io.flush.external
-					, io.calls.flush, io.calls.drain, io.calls.errors.busy
-					, io.calls.submitted, avgsubs
-					, io.calls.completed, avgcomp
-					, io.poller.sleeps
-				);
+				sstr | "-     submits       : " | eng3(io.calls.submitted) | "(" | ws(3, 3, avgsubs) | "/flush)";
+				sstr | "-     completes     : " | eng3(io.calls.completed) | "(" | ws(3, 3, avgcomp) | "/drain)";
+
+				sstr | "- poller sleeping   : " | eng3(io.poller.sleeps);
+				sstr | nl;
 			}
 		#endif
+
+		if(flags) write( sstr, stdout );
 	}
 
