MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / commitMessage

Method commitMessage

src/protobuf.cpp:90–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void ProtoBuffer::commitMessage(protobuf_mark_t mark) {
91 size_t max_len_byte_count = mark & 7;
92 size_t message_start = mark >> 3;
93
94 size_t actual_len = _offset - (message_start + max_len_byte_count);
95 assert(varIntSize(actual_len) <= max_len_byte_count);
96
97 for (size_t i = 0; i < max_len_byte_count - 1; i++) {
98 _data[message_start + i] = (unsigned char) (0x80 | actual_len);
99 actual_len >>= 7;
100 }
101 _data[message_start + max_len_byte_count - 1] = (unsigned char) actual_len;
102}

Callers 6

TEST_CASEFunction · 0.80
recordStacksMethod · 0.80
recordSampleTypeMethod · 0.80
recordOtlpProfileMethod · 0.80
recordMethod · 0.80

Calls

no outgoing calls

Tested by 1

TEST_CASEFunction · 0.64