void Stats::Dump(VariableIndentationOutputStream& os,
std::string_view name, double total, double unit_size, constchar* unit) const { double percent = total > 0 ? 100.0 * Value() / total : 0; const size_t name_width = 52 - os.GetIndentation(); if (name.length() > name_width) { // Handle very long names by printing them on their own line.
os.Stream() << name << " \\\n";
name = "";
}
os.Stream()
<< std::setw(name_width) << std::left << name << " "
<< std::setw(6) << std::right << Count() << " "
<< std::setw(10) << std::fixed << std::setprecision(3) << Value() / unit_size << unit << " "
<< std::setw(6) << std::fixed << std::setprecision(1) << percent << "%\n";
// Sort all children by largest value first, then by name.
std::map<std::pair<double, std::string_view>, const Stats&> sorted_children; for (constauto& it : Children()) {
sorted_children.emplace(std::make_pair(-it.second.Value(), it.first), it.second);
}
// Add "other" row to represent any amount not account for by the children.
Stats other;
other.AddBytes(Value() - SumChildrenValues(), Count()); if (other.Value() != 0.0 && !Children().empty()) {
sorted_children.emplace(std::make_pair(-other.Value(), "(other)"), other);
}
// Print the data.
ScopedIndentation indent1(&os); for (constauto& it : sorted_children) {
it.second.Dump(os, it.first.second, total, unit_size, unit);
}
}
} // namespace art
#endif// ART_LIBARTBASE_BASE_STATS_INL_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.