Apollo
11.0
自动驾驶开放平台
memory_resource_statistic.h
浏览该文件的文档.
1
/******************************************************************************
2
* Copyright 2023 The Apollo Authors. All Rights Reserved.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*****************************************************************************/
16
17
#pragma once
18
19
#include <string>
20
#include <vector>
21
22
#include "modules/statistics_msgs/resource_statistic.pb.h"
23
24
#include "
cyber/cyber.h
"
29
namespace
apollo
{
30
namespace
resource_statistic {
31
32
class
MemoryResourceStatistic
{
33
public
:
39
bool
GetMemoryMetric
(
MemoryMetric
* mem_metric);
40
41
private
:
47
uint64_t GetMemoryValueFromLine(
const
std::string& stat_line);
48
};
49
50
}
// namespace resource_statistic
51
}
// namespace apollo
apollo::resource_statistic::MemoryResourceStatistic
Definition
memory_resource_statistic.h:32
apollo::resource_statistic::MemoryResourceStatistic::GetMemoryMetric
bool GetMemoryMetric(MemoryMetric *mem_metric)
Get memory metric and write it into mem_metric.
Definition
memory_resource_statistic.cc:26
cyber.h
apollo
class register implement
Definition
arena_queue.h:37
apollo::resource_statistic::MemoryMetric
Definition
resource_statistic.proto:27
modules
statistics
resource
memory_resource_statistic.h