class RealDebugCounter

Defined at line 424 of file ../../third_party/protobuf/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 426 of file ../../third_party/protobuf/src/google/protobuf/port.h

void Inc ()

Lossy increment.

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

size_t value ()

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