pS-usage: captures held by live ReaSampler 9000 instances are un-prunable — instances publish usage_<guid> ext-state records (ComponentState v11), prune unions live holds into referenced
This commit is contained in:
@@ -33,6 +33,20 @@ std::vector<std::string> pruneOrphans(const std::vector<std::string>& present,
|
||||
return orphans;
|
||||
}
|
||||
|
||||
std::vector<std::string> mergeReferenced(const std::vector<std::string>& primary,
|
||||
const std::vector<std::string>& extra) {
|
||||
std::vector<std::string> merged;
|
||||
merged.reserve(primary.size() + extra.size());
|
||||
std::unordered_set<std::string> seen;
|
||||
for (const std::string& p : primary) {
|
||||
if (seen.insert(p).second) merged.push_back(p);
|
||||
}
|
||||
for (const std::string& p : extra) {
|
||||
if (seen.insert(p).second) merged.push_back(p);
|
||||
}
|
||||
return merged;
|
||||
}
|
||||
|
||||
PruneReport buildPruneReport(
|
||||
const std::vector<std::string>& orphans,
|
||||
const std::unordered_map<std::string, std::uint64_t>& sizeByPath,
|
||||
|
||||
Reference in New Issue
Block a user