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

Method PerformanceTest

example/rdma_performance/client.cpp:79–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77class PerformanceTest {
78public:
79 PerformanceTest(int attachment_size, bool echo_attachment)
80 : _addr(NULL)
81 , _channel(NULL)
82 , _start_time(0)
83 , _iterations(0)
84 , _stop(false)
85 {
86 if (attachment_size > 0) {
87 _addr = malloc(attachment_size);
88 butil::fast_rand_bytes(_addr, attachment_size);
89 _attachment.append(_addr, attachment_size);
90 }
91 _echo_attachment = echo_attachment;
92 }
93
94 ~PerformanceTest() {
95 if (_addr) {

Callers

nothing calls this directly

Calls 2

fast_rand_bytesFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected