UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
profiler.h
Go to the documentation of this file.
1 #ifndef UGDK_DEBUG_PROFILER_H_
2 #define UGDK_DEBUG_PROFILER_H_
3 
4 #include <ugdk/structure/types.h>
5 
6 #include <string>
7 #include <vector>
8 #include <memory>
9 
10 namespace ugdk {
11 namespace debug {
12 
13 struct SectionData;
14 struct SectionData {
15 
17  std::string name;
18 
21  std::vector< std::shared_ptr<SectionData> > subdata;
22 };
23 
25  public:
26  ProfileSection(const std::string& section_name);
28 
29  std::shared_ptr<const SectionData> data() const { return data_; }
30 
31  private:
32  ProfileSection* parent_section_;
33  uint64 start_time_;
34  std::shared_ptr<SectionData> data_;
35 };
36 
37 } // namespace debug
38 } // namespace ugdk
39 
40 #endif // UGDK_DEBUG_PROFILER_H_
std::string name
Name of this section.
Definition: profiler.h:17
Definition: animation.h:11
Definition: profiler.h:24
ProfileSection(const std::string &section_name)
Definition: profiler.h:14
uint64_t uint64
Definition: types.h:15
uint64 duration_
Length of this section, in microseconds.
Definition: profiler.h:20
std::vector< std::shared_ptr< SectionData > > subdata
Definition: profiler.h:21
std::shared_ptr< const SectionData > data() const
Definition: profiler.h:29