28 using Clock = std::chrono::high_resolution_clock;
42 WaveBitmapCachePreprocess,
74 Duration GetLastDuration()
const noexcept;
76 Duration GetMinDuration()
const noexcept;
78 Duration GetMaxDuration()
const noexcept;
80 Duration GetAverageDuration()
const noexcept;
82 size_t GetEventsCount()
const noexcept;
84 void AddEvent(
Duration duration)
noexcept;
86 static constexpr size_t KERNEL_SIZE = 16;
89 Duration mMinDuration { std::numeric_limits<Duration::rep>::max() };
95 size_t mNextIndex { 0 };
96 size_t mKernelItems { 0 };
98 size_t mEventsCount { 0 };
RAII wrapper used to measure a section time.
A class to profile TrackPanel painting.
SectionID
ID of the profiling section.
void AddEvent(SectionID section, Duration duration)
UpdatePublisher mUpdatePublisher
Clock::time_point Timepoint
std::chrono::high_resolution_clock Clock
static const Section & GetSection(SectionID section) noexcept
Get the section data.
Section mSections[size_t(SectionID::Count)]
static Stopwatch CreateStopwatch(SectionID section) noexcept
Create a Stopwatch for the section specified.
static Observer::Subscription Subscribe(UpdatePublisher::Callback callback)
Subscribe to sections update.
An object that sends messages to an open-ended list of subscribed callbacks.
std::function< CallbackReturn(const SectionID &) > Callback
Type of functions that can be connected to the Publisher.
A move-only handle representing a connection to a Publisher.
The TrackPanel class coordinates updates and operations on the main part of the screen which contains...
Cache containing rasterized bitmaps representing the waveform.
Cache that contains the waveform data.
size_t Count(const Ptr< Type, BaseDeleter > &p)
Find out how many elements were allocated with a Ptr.
A helper that notifies the view that a specific section has changed.