#include <performance_profiler.h>
The main profiler in Blowbox.
This class is here in Blowbox to let you profile your code. You can start profiling a new block of code by calling stack-allocating a PerformanceProfiler::ProfilerBlock. Once the ProfilerBlock has expired, it automatically notifies the main Profiler. See the PerformanceProfiler::ProfilerBlock for a more detailed explanation.
void blowbox::PerformanceProfiler::AddProfilerBlock |
( |
ProfilerBlock & |
profiler_block | ) |
|
|
protected |
Adds a PerformanceProfiler::ProfilerBlock to the profiler. The profiler will automatically figure out how to handle it.
- Parameters
-
[in] | profiler_block | The block that needs to be added. |
void blowbox::PerformanceProfiler::CatchNextFrame |
( |
| ) |
|
Makes the profiler collect the next frame's data.
Converts a ProfilerBlockType to a String.
- Parameters
-
[in] | type | The type that should be converted. |
void blowbox::PerformanceProfiler::NewFrame |
( |
| ) |
|
Starts a new profiling frame.
void blowbox::PerformanceProfiler::RenderMenu |
( |
| ) |
|
|
overridevirtual |
void blowbox::PerformanceProfiler::RenderWindow |
( |
| ) |
|
|
overridevirtual |
float blowbox::PerformanceProfiler::bounds_reset_interval_ |
|
private |
The interval at which bounds should be reset.
bool blowbox::PerformanceProfiler::catch_frame_ |
|
private |
Whether all ProfilerBlocks in the current frames are being caught for frame analysis.
bool blowbox::PerformanceProfiler::catch_next_frame_ |
|
private |
Whether the next frame should be made ready for data collection.
All PerformanceProfiler::ProfilerBlocks that are collected when catch_frame_ is on, are stored in this array.
This map helps in removing duplicates from the collected_profiler_blocks_single_frame_ array.
float blowbox::PerformanceProfiler::contiguous_block_times[BLOWBOX_PROFILER_HISTORY_MAX_SAMPLE_COUNT] |
|
private |
An array that gets re-used for every type of block time that needs to be stored contiguously (requirement for ImGui::PlotHistogram())
int blowbox::PerformanceProfiler::history_sample_count_ |
|
private |
The number of samples that should be kept as history for all history buffers.
float blowbox::PerformanceProfiler::last_bounds_reset_time_ |
|
private |
The last time that bounds got reset in the profiler.
ImGuiTextFilter blowbox::PerformanceProfiler::profiler_block_filters_[ProfilerBlockType_COUNT] |
|
private |
An array of text filters for filtering out profiler blocks from the individual ProfilerBlock views.
This is an array of maps that's used to categorize all the different PerformanceProfiler::ProfilerBlocks by storing their data in a map.
bool blowbox::PerformanceProfiler::show_window_ |
|
private |
Whether the profiler window should be shown.
The documentation for this class was generated from the following files:
- C:/Projects/blowbox-2017/src/core/debug/performance_profiler.h
- C:/Projects/blowbox-2017/src/core/debug/performance_profiler.cc