Audacity 3.2.0
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
FrameStatistics::Section Class Referencefinal

Profiling section data. More...

#include <FrameStatistics.h>

Public Member Functions

Duration GetLastDuration () const noexcept
 Duration of the last event. More...
 
Duration GetMinDuration () const noexcept
 All time minimum duration of the events in this section. More...
 
Duration GetMaxDuration () const noexcept
 All time maximum duration of the events in this section. More...
 
Duration GetAverageDuration () const noexcept
 Average duration of the last KERNEL_SIZE events in this section. More...
 
size_t GetEventsCount () const noexcept
 Total number of the events in this section. More...
 

Private Member Functions

void AddEvent (Duration duration) noexcept
 

Private Attributes

Duration mLastDuration {}
 
Duration mMinDuration { std::numeric_limits<Duration::rep>::max() }
 
Duration mMaxDuration { std::numeric_limits<Duration::rep>::min() }
 
Duration mAvgAccum {}
 
Duration mAvgDuration {}
 
Duration mFilteringKernel [KERNEL_SIZE] {}
 
size_t mNextIndex { 0 }
 
size_t mKernelItems { 0 }
 
size_t mEventsCount { 0 }
 

Static Private Attributes

static constexpr size_t KERNEL_SIZE = 16
 

Friends

class FrameStatistics
 

Detailed Description

Profiling section data.

Definition at line 70 of file FrameStatistics.h.

Member Function Documentation

◆ AddEvent()

void FrameStatistics::Section::AddEvent ( Duration  duration)
privatenoexcept

Definition at line 66 of file FrameStatistics.cpp.

67{
69
70 mLastDuration = duration;
71
73 mMaxDuration = std::max(mMaxDuration, duration);
74
75 // Kernel is initialized with zeroes
77
78 mFilteringKernel[mNextIndex] = duration;
79
81
84
86}
int min(int a, int b)
Duration mFilteringKernel[KERNEL_SIZE]
static constexpr size_t KERNEL_SIZE

References min().

Referenced by FrameStatistics::AddEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAverageDuration()

FrameStatistics::Duration FrameStatistics::Section::GetAverageDuration ( ) const
noexcept

Average duration of the last KERNEL_SIZE events in this section.

Definition at line 56 of file FrameStatistics.cpp.

57{
58 return mAvgDuration;
59}

◆ GetEventsCount()

size_t FrameStatistics::Section::GetEventsCount ( ) const
noexcept

Total number of the events in this section.

Definition at line 61 of file FrameStatistics.cpp.

62{
63 return mEventsCount;
64}

◆ GetLastDuration()

FrameStatistics::Duration FrameStatistics::Section::GetLastDuration ( ) const
noexcept

Duration of the last event.

Definition at line 38 of file FrameStatistics.cpp.

39{
40 return mLastDuration;
41}

◆ GetMaxDuration()

FrameStatistics::Duration FrameStatistics::Section::GetMaxDuration ( ) const
noexcept

All time maximum duration of the events in this section.

Definition at line 50 of file FrameStatistics.cpp.

51{
52 return mMaxDuration;
53}

◆ GetMinDuration()

FrameStatistics::Duration FrameStatistics::Section::GetMinDuration ( ) const
noexcept

All time minimum duration of the events in this section.

Definition at line 44 of file FrameStatistics.cpp.

45{
46 return mMinDuration;
47}

Friends And Related Function Documentation

◆ FrameStatistics

friend class FrameStatistics
friend

Definition at line 100 of file FrameStatistics.h.

Member Data Documentation

◆ KERNEL_SIZE

constexpr size_t FrameStatistics::Section::KERNEL_SIZE = 16
staticconstexprprivate

Definition at line 86 of file FrameStatistics.h.

◆ mAvgAccum

Duration FrameStatistics::Section::mAvgAccum {}
private

Definition at line 91 of file FrameStatistics.h.

◆ mAvgDuration

Duration FrameStatistics::Section::mAvgDuration {}
private

Definition at line 92 of file FrameStatistics.h.

◆ mEventsCount

size_t FrameStatistics::Section::mEventsCount { 0 }
private

Definition at line 98 of file FrameStatistics.h.

◆ mFilteringKernel

Duration FrameStatistics::Section::mFilteringKernel[KERNEL_SIZE] {}
private

Definition at line 94 of file FrameStatistics.h.

◆ mKernelItems

size_t FrameStatistics::Section::mKernelItems { 0 }
private

Definition at line 96 of file FrameStatistics.h.

◆ mLastDuration

Duration FrameStatistics::Section::mLastDuration {}
private

Definition at line 88 of file FrameStatistics.h.

◆ mMaxDuration

Duration FrameStatistics::Section::mMaxDuration { std::numeric_limits<Duration::rep>::min() }
private

Definition at line 90 of file FrameStatistics.h.

◆ mMinDuration

Duration FrameStatistics::Section::mMinDuration { std::numeric_limits<Duration::rep>::max() }
private

Definition at line 89 of file FrameStatistics.h.

◆ mNextIndex

size_t FrameStatistics::Section::mNextIndex { 0 }
private

Definition at line 95 of file FrameStatistics.h.


The documentation for this class was generated from the following files: