MCPcopy Create free account
hub / github.com/apple/foundationdb / getColocCounts

Function getColocCounts

fdbserver/ClusterController.actor.cpp:575–584  ·  view source on GitHub ↗

Returns a mapping from pid->pidCount for pids

Source from the content-addressed store, hash-verified

573
574// Returns a mapping from pid->pidCount for pids
575std::map<Optional<Standalone<StringRef>>, int> getColocCounts(
576 const std::vector<Optional<Standalone<StringRef>>>& pids) {
577 std::map<Optional<Standalone<StringRef>>, int> counts;
578 for (const auto& pid : pids) {
579 if (pid.present()) {
580 ++counts[pid];
581 }
582 }
583 return counts;
584}
585
586// Checks if there exists a better process for each singleton (e.g. DD) compared
587// to the process it is currently on.

Callers 1

checkBetterSingletonsFunction · 0.85

Calls 1

presentMethod · 0.45

Tested by

no test coverage detected