Merge pull request #5484 from sfc-gh-ajbeamon/network-thread-busyness-include-primary
When using an external client, report the larger of the primary and external network thread busyness
This commit is contained in:
commit
82419d086f
|
@ -998,12 +998,17 @@ ThreadFuture<Void> MultiVersionDatabase::createSnapshot(const StringRef& uid, co
|
|||
}
|
||||
|
||||
// Get network thread busyness
|
||||
// Return the busyness for the main thread. When using external clients, take the larger of the local client
|
||||
// and the external client's busyness.
|
||||
double MultiVersionDatabase::getMainThreadBusyness() {
|
||||
ASSERT(g_network);
|
||||
|
||||
double localClientBusyness = g_network->networkInfo.metrics.networkBusyness;
|
||||
if (dbState->db) {
|
||||
return dbState->db->getMainThreadBusyness();
|
||||
return std::max(dbState->db->getMainThreadBusyness(), localClientBusyness);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return localClientBusyness;
|
||||
}
|
||||
|
||||
// Returns the protocol version reported by the coordinator this client is connected to
|
||||
|
|
Loading…
Reference in New Issue