Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
FrameMetrics Class Reference

#include <FrameMetrics.h>

Public Member Functions

 FrameMetrics ()
 
virtual ~FrameMetrics ()
 
void init ()
 
void reset ()
 
void doPerFrameMetrics (UnsignedInt frame)
 
void processLatencyResponse (UnsignedInt frame)
 
void addCushion (Int cushion)
 
Real getAverageLatency ()
 
Int getAverageFPS ()
 
Int getMinimumCushion ()
 

Protected Attributes

Realm_fpsList
 A record of how many game logic frames per second there were for the last 60 seconds.
 
time_t m_lastFpsTimeThing
 The time when the last fps entry started being recorded.
 
Int m_fpsListIndex
 Index into the array of the current fps list entry being measured.
 
Real m_averageFps
 The current average logic fps, computed just like m_averageLatency below but with the fps numbers.
 
Realm_latencyList
 A record of the round trip latencies of the frame info packets to the packet router. Values in seconds.
 
time_tm_pendingLatencies
 The latencies of frame info packets that are "in the air.".
 
Real m_averageLatency
 
UnsignedInt m_cushionIndex
 The next index to use for the cushion list.
 
Int m_minimumCushion
 The average cushion for the history.
 

Detailed Description

Definition at line 35 of file FrameMetrics.h.

Constructor & Destructor Documentation

◆ FrameMetrics()

FrameMetrics::FrameMetrics ( )

FrameMetrics.cpp

Definition at line 33 of file FrameMetrics.cpp.

◆ ~FrameMetrics()

FrameMetrics::~FrameMetrics ( )
virtual

Definition at line 52 of file FrameMetrics.cpp.

Member Function Documentation

◆ addCushion()

void FrameMetrics::addCushion ( Int cushion)

Definition at line 126 of file FrameMetrics.cpp.

◆ doPerFrameMetrics()

void FrameMetrics::doPerFrameMetrics ( UnsignedInt frame)

Definition at line 89 of file FrameMetrics.cpp.

◆ getAverageFPS()

Int FrameMetrics::getAverageFPS ( )

Definition at line 137 of file FrameMetrics.cpp.

◆ getAverageLatency()

Real FrameMetrics::getAverageLatency ( )

Definition at line 141 of file FrameMetrics.cpp.

◆ getMinimumCushion()

Int FrameMetrics::getMinimumCushion ( )

Definition at line 145 of file FrameMetrics.cpp.

◆ init()

void FrameMetrics::init ( )

Definition at line 70 of file FrameMetrics.cpp.

◆ processLatencyResponse()

void FrameMetrics::processLatencyResponse ( UnsignedInt frame)

Definition at line 111 of file FrameMetrics.cpp.

◆ reset()

void FrameMetrics::reset ( )

Definition at line 85 of file FrameMetrics.cpp.

Member Data Documentation

◆ m_averageFps

Real FrameMetrics::m_averageFps
protected

The current average logic fps, computed just like m_averageLatency below but with the fps numbers.

Definition at line 57 of file FrameMetrics.h.

◆ m_averageLatency

Real FrameMetrics::m_averageLatency
protected

The current average latency, this is used to save calculation time. When a new latency value is received, the old one is subtracted out and the new one is added in.

Definition at line 64 of file FrameMetrics.h.

◆ m_cushionIndex

UnsignedInt FrameMetrics::m_cushionIndex
protected

The next index to use for the cushion list.

Definition at line 70 of file FrameMetrics.h.

◆ m_fpsList

Real* FrameMetrics::m_fpsList
protected

A record of how many game logic frames per second there were for the last 60 seconds.

Definition at line 54 of file FrameMetrics.h.

◆ m_fpsListIndex

Int FrameMetrics::m_fpsListIndex
protected

Index into the array of the current fps list entry being measured.

Definition at line 56 of file FrameMetrics.h.

◆ m_lastFpsTimeThing

time_t FrameMetrics::m_lastFpsTimeThing
protected

The time when the last fps entry started being recorded.

Definition at line 55 of file FrameMetrics.h.

◆ m_latencyList

Real* FrameMetrics::m_latencyList
protected

A record of the round trip latencies of the frame info packets to the packet router. Values in seconds.

Definition at line 62 of file FrameMetrics.h.

◆ m_minimumCushion

Int FrameMetrics::m_minimumCushion
protected

The average cushion for the history.

Definition at line 71 of file FrameMetrics.h.

◆ m_pendingLatencies

time_t* FrameMetrics::m_pendingLatencies
protected

The latencies of frame info packets that are "in the air.".

Definition at line 63 of file FrameMetrics.h.


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