class CordzUpdateTracker
Defined at line 37 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h
CordzUpdateTracker tracks counters for Cord update methods.
The purpose of CordzUpdateTracker is to track the number of calls to methods
updating Cord data for sampled cords. The class internally uses 'lossy'
atomic operations: Cord is thread-compatible, so there is no need to
synchronize updates. However, Cordz collection threads may call 'Value()' at
any point, so the class needs to provide thread safe access.
This class is thread-safe. But as per above comments, all non-const methods
should be used single-threaded only: updates are thread-safe but lossy.
Public Methods
void CordzUpdateTracker ()
Constructs a new instance. All counters are zero-initialized.
Defined at line 72 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h
void CordzUpdateTracker (const CordzUpdateTracker & rhs)
Copy constructs a new instance.
Defined at line 75 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h
CordzUpdateTracker & operator= (const CordzUpdateTracker & rhs)
Assigns the provided value to this instance.
Defined at line 78 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h
int64_t Value (MethodIdentifier method)
Returns the value for the specified method.
Defined at line 87 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h
void LossyAdd (MethodIdentifier method, int64_t n)
Increases the value for the specified method by `n`
Defined at line 92 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h
void LossyAdd (const CordzUpdateTracker & src)
Adds all the values from `src` to this instance
Defined at line 99 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h
Enumerations
enum MethodIdentifier
| Name | Value |
|---|---|
| kUnknown | 0 |
| kAppendCord | 1 |
| kAppendCordBuffer | 2 |
| kAppendExternalMemory | 3 |
| kAppendString | 4 |
| kAssignCord | 5 |
| kAssignString | 6 |
| kClear | 7 |
| kConstructorCord | 8 |
| kConstructorString | 9 |
| kCordReader | 10 |
| kFlatten | 11 |
| kGetAppendBuffer | 12 |
| kGetAppendRegion | 13 |
| kMakeCordFromExternal | 14 |
| kMoveAppendCord | 15 |
| kMoveAssignCord | 16 |
| kMovePrependCord | 17 |
| kPrependCord | 18 |
| kPrependCordBuffer | 19 |
| kPrependString | 20 |
| kRemovePrefix | 21 |
| kRemoveSuffix | 22 |
| kSetExpectedChecksum | 23 |
| kSubCord | 24 |
| kNumMethods | 25 |
Tracked update methods.
Defined at line 40 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h