Apollo 10.0
自动驾驶开放平台
apollo::cyber::profiler::Frame类 参考

#include <frame.h>

apollo::cyber::profiler::Frame 的协作图:

Public 成员函数

void Push (Block *block)
 
BlockTop ()
 
void Pop ()
 
bool DumpToFile (const std::string &coroutine_name)
 
void Clear ()
 
std::uint32_t size () const
 
bool finished () const
 

详细描述

在文件 frame.h30 行定义.

成员函数说明

◆ Clear()

void Frame::Clear ( )

在文件 frame.cc61 行定义.

61 {
62 storage_.clear();
63}

◆ DumpToFile()

bool Frame::DumpToFile ( const std::string &  coroutine_name)

在文件 frame.cc49 行定义.

49 {
50 // Use 'ALOG_MODULE' instead of 'AINFO' to specify the log file
51 ALOG_MODULE(kModuleName, INFO) << "Frame : " << routine_name;
52 for (const Block& block : storage_) {
54 << block.depth() << "," << block.name() << "," << block.duration()
55 << "," << block.begin_time_since_epoch()
56 << "," << block.end_time_since_epoch();
57 }
58 return true;
59}
#define ALOG_MODULE(module, log_severity)
Definition log.h:52
constexpr char kModuleName[]
Definition frame.cc:27

◆ finished()

bool apollo::cyber::profiler::Frame::finished ( ) const
inline

在文件 frame.h40 行定义.

40{ return stack_.empty(); }

◆ Pop()

void Frame::Pop ( )

在文件 frame.cc40 行定义.

40 {
41 if (stack_.empty())
42 return;
43
44 Block* block_ptr = stack_.top();
45 stack_.pop();
46 storage_.push_back(std::move(*block_ptr));
47}

◆ Push()

void Frame::Push ( Block block)

在文件 frame.cc29 行定义.

29 {
30 if (block != nullptr)
31 stack_.push(block);
32}

◆ size()

std::uint32_t apollo::cyber::profiler::Frame::size ( ) const
inline

在文件 frame.h39 行定义.

39{ return stack_.size(); }

◆ Top()

Block * Frame::Top ( )

在文件 frame.cc34 行定义.

34 {
35 if (stack_.empty())
36 return nullptr;
37 return stack_.top();
38}

该类的文档由以下文件生成: