fix: runLoopBusyness was always zero
This commit is contained in:
parent
947a625968
commit
f6f9aea09e
|
@ -1401,7 +1401,7 @@ ACTOR Future<GetReadVersionReply> getLiveCommittedVersion(ProxyCommitData* commi
|
|||
rep = v;
|
||||
}
|
||||
}
|
||||
rep.processBusyTime = 1e6 * (g_network->isSimulated() ? deterministicRandom()->random01() : g_network->networkInfo.metrics.lastZeroBusy);
|
||||
rep.processBusyTime = 1e6 * (g_network->isSimulated() ? deterministicRandom()->random01() : g_network->networkInfo.metrics.lastRunLoopBusyness);
|
||||
|
||||
if (debugID.present()) {
|
||||
g_traceBatch.addEvent("TransactionDebug", debugID.get().first(), "MasterProxyServer.getLiveCommittedVersion.After");
|
||||
|
|
|
@ -166,6 +166,8 @@ SystemStatistics customSystemMonitor(std::string eventName, StatisticsState *sta
|
|||
n.detail(format("PriorityBusy%d", itr.first).c_str(), itr.second);
|
||||
}
|
||||
|
||||
g_network->networkInfo.metrics.lastRunLoopBusyness = std::min(currentStats.elapsed,g_network->networkInfo.metrics.starvationTrackers[0].duration)/currentStats.elapsed;
|
||||
|
||||
for (auto &itr : g_network->networkInfo.metrics.starvationTrackers) {
|
||||
if(itr.active) {
|
||||
itr.duration += now() - itr.windowedTimer;
|
||||
|
@ -180,8 +182,6 @@ SystemStatistics customSystemMonitor(std::string eventName, StatisticsState *sta
|
|||
itr.maxDuration = 0;
|
||||
}
|
||||
|
||||
g_network->networkInfo.metrics.lastZeroBusy = std::min(currentStats.elapsed,g_network->networkInfo.metrics.starvationTrackers[0].duration)/currentStats.elapsed;
|
||||
|
||||
n.trackLatest("NetworkMetrics");
|
||||
}
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ struct NetworkMetrics {
|
|||
};
|
||||
|
||||
std::unordered_map<TaskPriority, struct PriorityStats> activeTrackers;
|
||||
double lastZeroBusy;
|
||||
double lastRunLoopBusyness;
|
||||
std::vector<struct PriorityStats> starvationTrackers;
|
||||
|
||||
static const std::vector<int> starvationBins;
|
||||
|
|
Loading…
Reference in New Issue