Skip to content

Commit d0450f9

Browse files
committed
crimson/osd: report the average reactor utilization
Signed-off-by: Yingxin Cheng <[email protected]>
1 parent 1a7902c commit d0450f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/crimson/osd/osd.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,16 @@ seastar::future<> OSD::start()
411411
shard_stats[seastar::this_shard_id()] = stats;
412412
}).then([this, FNAME] {
413413
std::ostringstream oss;
414+
double agg_ru = 0;
415+
int cnt = 0;
414416
for (const auto &stats : shard_stats) {
417+
agg_ru += stats.reactor_utilization;
418+
++cnt;
415419
oss << int(stats.reactor_utilization);
416420
oss << ",";
417421
}
418-
INFO("reactor_utilizations: {}", oss.str());
422+
INFO("reactor_utilizations: {}({})",
423+
int(agg_ru/cnt), oss.str());
419424
});
420425
});
421426
gate.dispatch_in_background("stats_store", *this, [this] {

0 commit comments

Comments
 (0)