Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
plot.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <cstdint>
7
8namespace helios::profile {
9
10/**
11 * @brief Records a plot sample on all active backends
12 * @param name The name of the plot channel
13 * @param value The value to record
14 */
15inline void Plot(CStringView name, double value) noexcept {
16 Profiler::Instance().Plot(name, value);
17}
18
19/**
20 * @brief Configures a plot channel on all active backends
21 * @param name The name of the plot channel
22 * @param type The format of the plot channel
23 * @param step Whether the plot should be step-wise
24 * @param fill Whether the plot should be filled
25 * @param color The color to associate with the plot channel
26 */
27inline void PlotConfig(CStringView name, PlotFormat type, bool step, bool fill,
28 uint32_t color) noexcept {
29 Profiler::Instance().PlotConfig(name, type, step, fill, color);
30}
31
32} // namespace helios::profile
static Profiler & Instance() noexcept
Returns the singleton profiler instance.
Definition profiler.hpp:403
void PlotConfig(CStringView name, PlotFormat type, bool step, bool fill, uint32_t color) noexcept
Dispatches a plot configuration event to all registered backends.
Definition profiler.cpp:251
void Plot(CStringView name, double value) noexcept
Dispatches a plot event to all registered backends.
Definition profiler.cpp:241
PlotFormat
Plot value format for timeline plots.
Definition common.hpp:10
void PlotConfig(CStringView name, PlotFormat type, bool step, bool fill, uint32_t color) noexcept
Configures a plot channel on all active backends.
Definition plot.hpp:27
void Plot(CStringView name, double value) noexcept
Records a plot sample on all active backends.
Definition plot.hpp:15
BasicCStringView< char > CStringView
A view of a null-terminated C string.