Skip to main content

EntityStatistic

A class in Root.Township, Alta.Profiling.Networking.

Network profiling stats for one entity: bytes sent, split by entity message type and by behaviour. Used by the networking profiler.

Constructors​

MemberWhat it is
EntityStatistic(string name)Creates an EntityStatistic from name.

Fields​

4 private and internal fields
MemberWhat it is
private SerializedBehaviourStatistics behaviourStatisticsBytes sent per behaviour on this entity. Backing field for BehaviourStatistics.
private string entityNameName of the entity being measured. Backing field for EntityName.
private bool isExpandedWhether the entry is expanded in the profiler view.
private EntityMessageStatistics messageStatisticsBytes sent per entity message type. Backing field for MessageStatistics.

Properties​

MemberWhat it is
SerializedBehaviourStatistics BehaviourStatistics { get; }Byte counts per serialized behaviour name.
string EntityName { get; }The name this statistic was created with.
EntityMessageStatistics MessageStatistics { get; }Byte counts per entity message type.

Methods​

MemberWhat it is
override string GetSummary(float statisticDuration)A one-line summary with the entity name padded to 60 characters, then the base stats.
void RegisterBehaviourSend(string behaviourName, int byteCount)Records bytes sent by a named behaviour of this entity.
void RegisterMessageSend(EntityMessageType messageType, int byteCount)Records bytes sent for one entity message type.
override void ResetStatisticTotals()Resets the totals, including the per message and per behaviour ones.
override void UpdateValuePerFrame()Rolls the per frame byte totals, including the per message and per behaviour ones.
override void UpdateValuePerLastSecond()Rolls the last second byte totals, including the per message and per behaviour ones.

Used in​

Members of other types that take, return or hold a EntityStatistic: