class RealDebugCounter

Defined at line 763 of file ../../third_party/protobuf/src/src/google/protobuf/port.h

Counter library for debugging internal protobuf logic.

It allows instrumenting code that has different options (eg fast vs slow

path) to get visibility into how much we are hitting each path.

When compiled with -DPROTOBUF_INTERNAL_ENABLE_DEBUG_COUNTERS, the counters

register an atexit handler to dump the table. Otherwise, they are a noop and

have not runtime cost.

Usage:

if (do_fast) {

PROTOBUF_DEBUG_COUNTER("Foo.Fast").Inc();

...

} else {

PROTOBUF_DEBUG_COUNTER("Foo.Slow").Inc();

...

}

Public Methods

void RealDebugCounter (absl::string_view name)

Defined at line 765 of file ../../third_party/protobuf/src/src/google/protobuf/port.h

void Inc ()

Lossy increment.

Defined at line 767 of file ../../third_party/protobuf/src/src/google/protobuf/port.h

size_t value ()

Defined at line 768 of file ../../third_party/protobuf/src/src/google/protobuf/port.h