aboutsummaryrefslogtreecommitdiff
path: root/absl/strings/internal/cordz_statistics.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/internal/cordz_statistics.h')
-rw-r--r--absl/strings/internal/cordz_statistics.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/absl/strings/internal/cordz_statistics.h b/absl/strings/internal/cordz_statistics.h
index 6e335c0b..1c93dfd0 100644
--- a/absl/strings/internal/cordz_statistics.h
+++ b/absl/strings/internal/cordz_statistics.h
@@ -28,6 +28,15 @@ namespace cord_internal {
struct CordzStatistics {
using MethodIdentifier = CordzUpdateTracker::MethodIdentifier;
+ // Node counts information
+ struct NodeCounts {
+ size_t flat = 0;
+ size_t external = 0;
+ size_t substring = 0;
+ size_t concat = 0;
+ size_t ring = 0;
+ };
+
// The size of the cord in bytes. This matches the result of Cord::size().
int64_t size = 0;
@@ -50,6 +59,9 @@ struct CordzStatistics {
// A value of 0 implies the property has not been recorded.
int64_t node_count = 0;
+ // Detailed node counts per type
+ NodeCounts node_counts;
+
// The cord method responsible for sampling the cord.
MethodIdentifier method = MethodIdentifier::kUnknown;