MCPcopy Create free account
hub / github.com/apache/brpc / TEST

Function TEST

test/bvar_recorder_unittest.cpp:33–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31namespace {
32#if !WITH_BABYLON_COUNTER
33TEST(RecorderTest, test_complement) {
34 LOG(INFO) << "sizeof(LatencyRecorder)=" << sizeof(bvar::LatencyRecorder)
35 << " " << sizeof(bvar::detail::Percentile)
36 << " " << sizeof(bvar::Maxer<int64_t>)
37 << " " << sizeof(bvar::IntRecorder)
38 << " " << sizeof(bvar::Window<bvar::IntRecorder>)
39 << " " << sizeof(bvar::Window<bvar::detail::Percentile>);
40
41 for (int a = -10000000; a < 10000000; ++a) {
42 const uint64_t complement = bvar::IntRecorder::_get_complement(a);
43 const int64_t b = bvar::IntRecorder::_extend_sign_bit(complement);
44 ASSERT_EQ(a, b);
45 }
46}
47
48TEST(RecorderTest, test_compress) {
49 const uint64_t num = 125345;

Callers

nothing calls this directly

Calls 7

cpuwide_time_usFunction · 0.85
averageMethod · 0.80
validMethod · 0.45
exposeMethod · 0.45
sizeMethod · 0.45
set_debug_nameMethod · 0.45
qpsMethod · 0.45

Tested by

no test coverage detected