Skip to main content

NetworkingStatisticsList<T>

An abstract class in Root.Township, Alta.Utilities.Profiling.NetworkTransportMetrics.

A named list of network traffic statistics with per-frame and per-second byte totals, for profiling and summary dumps.

Constructors​

MemberWhat it is
protected NetworkingStatisticsList()Creates a NetworkingStatisticsList with default values.

Fields​

MemberWhat it is
protected List<T> statisticsThe serialized list of statistics. May hold null gaps added by EnsureStatisticsListCapacity.
2 private and internal fields
MemberWhat it is
private float averageBytesPerFrameAllTimeTotal bytes over total message count across the list, set by UpdateTotalBytesPerFrame.
private float totalBytesPerLastSecondSum of every statistic's last-second bytes, set by UpdateTotalBytesPerLastSecond.

Properties​

MemberWhat it is
string Name { get; protected set; }Name shown in the summary.
IEnumerable<T> Statistics { get; }The statistics. Entries can be null.

Methods​

MemberWhat it is
string CreateSummaryDump(float dumpDuration)Text summary: list name, average bytes per frame, bytes in the last second, then each statistic.
void ResetAll()Resets the totals of every statistic.
virtual void UpdateTotalBytesPerFrame()Updates each statistic's per-frame value and the all-time average bytes per frame.
virtual void UpdateTotalBytesPerLastSecond()Updates each statistic's last-second value and the total.
protected void EnsureStatisticsListCapacity(int index)Pads the list with nulls so the index exists.