You.i Engine
YiEasyProfiler.h
Go to the documentation of this file.
1 #ifndef _YI_EASY_PROFILER_H_
2 #define _YI_EASY_PROFILER_H_
3 
4 // Parts of easy_profiler do not work on IOS and tvOS simulators so we must disable easy profiler to compile out all the macros.
5 #if __APPLE__
6 # include "TargetConditionals.h"
7 # if TARGET_OS_IPHONE && TARGET_IPHONE_SIMULATOR
8 # define DISABLE_EASY_PROFILER
9 # endif
10 #endif
11 
12 #include <easy/profiler.h>
13 
14 class CYIString;
15 
36 #define YI_START_EASY_PROFILER_CAPTURE_AT_INIT \
37  static bool YiStartEasyProfilerCaptureAtInitVariable = \
38  []() { CYIEasyProfiler::StartCapture(); return true; }();
39 
53 {
54 public:
55  CYIEasyProfiler() = delete;
56 
69  static void StartListening();
70 
78  static void StartListening(uint16_t port);
79 
85  static void StopListening();
86 
93  static bool IsListening();
94 
103  static void StartCapture();
104 
110  static void StopCapture();
111 
115  static void StopCaptureAfterNextDraw();
116 
123  static bool IsCapturing();
124 
130  static uint32_t WriteToFile(const CYIString &fullPath);
131 };
132 
137 #endif
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:36
static void StopCapture()
static void StopListening()
static uint32_t WriteToFile(const CYIString &fullPath)
A wrapper around easy_profiler&#39;s API for starting the profiler server, writing to a file...
Definition: YiEasyProfiler.h:52
static void StartListening()
CYIEasyProfiler()=delete
static void StopCaptureAfterNextDraw()
static bool IsCapturing()
static bool IsListening()
static void StartCapture()