diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-10 20:28:55 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-11 17:34:34 -0400 |
commit | ddac1641ee1e2686c2211a8d671ea723634dfc89 (patch) | |
tree | 0596db2376fb5cbdcd83bf1642efdc7868ade480 /libbcachefs/util.c | |
parent | a6128b5335a79cd68b9dbb6b083a835d94539d04 (diff) |
Update bcachefs sources to 90a9c61e2b bcachefs: Switch bch2_btree_delete_range() to bch2_trans_run()
Diffstat (limited to 'libbcachefs/util.c')
-rw-r--r-- | libbcachefs/util.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/libbcachefs/util.c b/libbcachefs/util.c index 8ef4b591..ee2c7d9e 100644 --- a/libbcachefs/util.c +++ b/libbcachefs/util.c @@ -376,31 +376,37 @@ void bch2_time_stats_to_text(struct printbuf *out, struct time_stats *stats) u64 q, last_q = 0; int i; - prt_printf(out, "count:\t\t%llu\n", + prt_printf(out, "count:\t\t%llu", stats->count); - prt_printf(out, "rate:\t\t%llu/sec\n", + prt_newline(out); + prt_printf(out, "rate:\t\t%llu/sec", freq ? div64_u64(NSEC_PER_SEC, freq) : 0); + prt_newline(out); prt_printf(out, "frequency:\t"); pr_time_units(out, freq); - prt_printf(out, "\navg duration:\t"); + prt_newline(out); + prt_printf(out, "avg duration:\t"); pr_time_units(out, stats->average_duration); - prt_printf(out, "\nmax duration:\t"); + prt_newline(out); + prt_printf(out, "max duration:\t"); pr_time_units(out, stats->max_duration); i = eytzinger0_first(NR_QUANTILES); u = pick_time_units(stats->quantiles.entries[i].m); - prt_printf(out, "\nquantiles (%s):\t", u->name); + prt_newline(out); + prt_printf(out, "quantiles (%s):\t", u->name); eytzinger0_for_each(i, NR_QUANTILES) { bool is_last = eytzinger0_next(i, NR_QUANTILES) == -1; q = max(stats->quantiles.entries[i].m, last_q); - prt_printf(out, "%llu%s", - div_u64(q, u->nsecs), - is_last ? "\n" : " "); + prt_printf(out, "%llu ", + div_u64(q, u->nsecs)); + if (is_last) + prt_newline(out); last_q = q; } } |