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

Function TEST_F

test/brpc_http_parser_unittest.cpp:36–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34};
35
36TEST_F(HttpParserTest, init_perf) {
37 const size_t loops = 10000000;
38 butil::Timer timer;
39 timer.start();
40 for (size_t i = 0; i < loops; ++i) {
41 http_parser parser;
42 http_parser_init(&parser, brpc::HTTP_REQUEST);
43 }
44 timer.stop();
45 std::cout << "It takes " << timer.n_elapsed() / loops
46 << "ns to init a http_parser"
47 << std::endl;
48}
49
50int on_message_begin(http_parser *) {
51 LOG(INFO) << "Start parsing message";

Callers

nothing calls this directly

Calls 6

http_parser_initFunction · 0.85
http_parser_executeFunction · 0.85
AppendFileNameFunction · 0.85
n_elapsedMethod · 0.80
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected