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

Method ReadVersion

src/bvar/default_variables.cpp:619–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617struct ReadVersion {
618 std::string content;
619 ReadVersion() {
620 std::ostringstream oss;
621 if (butil::read_command_output(oss, "uname -ap") != 0) {
622 LOG(ERROR) << "Fail to read kernel version";
623 return;
624 }
625 content.append(oss.str());
626 }
627};
628static void get_kernel_version(std::ostream& os, void*) {
629 os << butil::get_leaky_singleton<ReadVersion>()->content;

Callers

nothing calls this directly

Calls 2

read_command_outputFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected