Fix mem_stat.

GitOrigin-RevId: 491abe3e44c8ffaf5c9e1b2d3c726a5ce69f599b
This commit is contained in:
levlam 2018-02-14 04:23:59 +03:00
parent bcb6e33389
commit 428cb9cf10

View File

@ -187,6 +187,11 @@ Result<MemStat> mem_stat() {
}
if (x != nullptr) {
Slice value(name_end, s);
if (!value.empty() && value[0] == ':') {
value.remove_prefix(1);
}
value = trim(value);
value = split(value).first;
auto r_mem = to_integer_safe<uint64>(value);
if (r_mem.is_error()) {
LOG(ERROR) << "Failed to parse memory stats " << tag("name", name) << tag("value", value);