#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/FrameProfiler.hpp>
Classes | |
| struct | Section |
| struct | Frame |
Public Member Functions | |
| void | begin_frame () |
| void | mark (const char *name) |
| void | end_frame () |
| const std::vector< Section > & | sections () const |
| void | start_averaging () |
| bool | is_averaging () const |
| std::vector< Section > | finish_averaging (bool wait) |
| void | reset () |
Private Member Functions | |
| void | collect (bool wait) |
Private Attributes | |
| std::array< Frame, FRAMES_IN_FLIGHT > | m_frames |
| Frame * | m_recording { nullptr } |
| size_t | m_next { 0 } |
| std::chrono::steady_clock::time_point | m_last_mark |
| std::vector< Section > | m_sections |
| bool | m_averaging { false } |
| std::vector< Section > | m_sums |
| size_t | m_averaged_frames { 0 } |
Static Private Attributes | |
| static constexpr size_t | FRAMES_IN_FLIGHT = 4 |
| static constexpr size_t | MAX_SECTIONS = 32 |
| struct Slic3r::GUI::FrameProfiler::Section |
| Class Members | ||
|---|---|---|
| double | cpu_ms { 0.0 } | |
| double | gpu_ms { 0.0 } | |
| const char * | name { nullptr } | |
| struct Slic3r::GUI::FrameProfiler::Frame |
| Class Members | ||
|---|---|---|
| bool | averaged { false } | |
| size_t | count { 0 } | |
| array< double, MAX_SECTIONS > | cpu_ms {} | |
| array< const char *, MAX_SECTIONS > | names {} | |
| bool | pending { false } | |
| array< unsigned int, 2 *MAX_SECTIONS > | queries {} | |
| void Slic3r::GUI::FrameProfiler::begin_frame | ( | ) |
References Slic3r::GUI::FrameProfiler::Frame::averaged, collect(), Slic3r::GUI::FrameProfiler::Frame::count, GL_TIMESTAMP, glGenQueries, glQueryCounter, glsafe, m_averaging, m_frames, m_last_mark, m_next, m_recording, Slic3r::GUI::FrameProfiler::Frame::pending, and Slic3r::GUI::FrameProfiler::Frame::queries.
|
private |
References Slic3r::GUI::FrameProfiler::Frame::averaged, Slic3r::GUI::FrameProfiler::Frame::count, Slic3r::GUI::FrameProfiler::Frame::cpu_ms, Slic3r::GUI::FrameProfiler::Section::cpu_ms, FRAMES_IN_FLIGHT, GL_QUERY_RESULT, GL_QUERY_RESULT_AVAILABLE, glGetQueryObjectiv, glGetQueryObjectui64v, glsafe, Slic3r::GUI::FrameProfiler::Section::gpu_ms, m_averaged_frames, m_averaging, m_frames, m_next, m_sections, m_sums, Slic3r::GUI::FrameProfiler::Section::name, Slic3r::GUI::FrameProfiler::Frame::names, Slic3r::GUI::FrameProfiler::Frame::pending, Slic3r::GUI::FrameProfiler::Frame::queries, and sections().
Referenced by begin_frame(), and finish_averaging().
| void Slic3r::GUI::FrameProfiler::end_frame | ( | ) |
References FRAMES_IN_FLIGHT, m_next, and m_recording.
| std::vector< FrameProfiler::Section > Slic3r::GUI::FrameProfiler::finish_averaging | ( | bool | wait | ) |
References collect(), glQueryCounter, m_averaged_frames, m_averaging, and m_sums.
|
inline |
References m_averaging.
| void Slic3r::GUI::FrameProfiler::mark | ( | const char * | name | ) |
References Slic3r::GUI::FrameProfiler::Frame::count, Slic3r::GUI::FrameProfiler::Frame::cpu_ms, GL_TIMESTAMP, glFlush, glQueryCounter, glsafe, m_last_mark, m_recording, MAX_SECTIONS, Slic3r::GUI::FrameProfiler::Frame::names, and Slic3r::GUI::FrameProfiler::Frame::queries.
| void Slic3r::GUI::FrameProfiler::reset | ( | ) |
References glDeleteQueries, glsafe, m_averaged_frames, m_averaging, m_frames, m_recording, m_sections, and m_sums.
|
inline |
| void Slic3r::GUI::FrameProfiler::start_averaging | ( | ) |
References m_averaged_frames, m_averaging, and m_sums.
|
staticconstexprprivate |
Referenced by collect(), and end_frame().
|
private |
Referenced by collect(), finish_averaging(), reset(), and start_averaging().
|
private |
Referenced by begin_frame(), collect(), finish_averaging(), is_averaging(), reset(), and start_averaging().
|
private |
Referenced by begin_frame(), collect(), and reset().
|
private |
Referenced by begin_frame(), and mark().
|
private |
Referenced by begin_frame(), collect(), and end_frame().
Referenced by begin_frame(), end_frame(), mark(), and reset().
|
private |
Referenced by collect(), reset(), and sections().
|
private |
Referenced by collect(), finish_averaging(), reset(), and start_averaging().
|
staticconstexprprivate |
Referenced by mark().