Skip to main content

ServerProfilingData

A class in Root.Township, the global namespace.

A snapshot of server performance numbers (FPS, networking, serialization, entity and creature counts, CPU and RAM) sent out by ServerDiagnosticsManager as the ProfilingData console event. Obsolete in favour of the analytics system; server only.

Constructors​

MemberWhat it is
ServerProfilingData()Creates a ServerProfilingData with default values.

Fields​

3 private and internal fields
MemberWhat it is
private float cachedTimeTime.time when the data was last refreshed; used for TimeSinceServerStart.
private readonly ProcessMetrics processMetricsReads the server process's CPU and RAM use.
private readonly float serverStartTimeTime.time when this object was made.

Properties​

MemberWhat it is
int AiAgentCount { get; }Number of AI agents being updated.
float AiAgentSorting { get; }Average ms spent sorting AI agents.
float AiAgentUpdating { get; }Average ms spent updating AI agents.
ulong AltaNetworkError_Congestion { get; }Count of congestion network errors.
ulong AltaNetworkError_ConnectionClosed { get; }Count of connection closed network errors.
ulong AltaNetworkError_DnsResolve { get; }Count of DNS resolve network errors.
ulong AltaNetworkError_InvalidReceive { get; }Count of invalid receive network errors.
ulong AltaNetworkError_InvalidSend { get; }Count of invalid send network errors.
ulong AltaNetworkError_None { get; }Count of sends that reported no error.
ulong AltaNetworkError_Timeout { get; }Count of timeout network errors.
ulong AltaNetworkError_Unexpected { get; }Count of unexpected network errors.
ulong AltaNetworkError_WrongConnection { get; }Count of wrong connection network errors.
float AveragePing { get; }Average ping across players.
int BabuCount { get; }Spawned babus.
float BytesPerSecond { get; }Network bytes per second, as of the last Cache.
int ChunksLoadedCount { get; }Loaded chunks.
float CPU { get; }Process CPU use.
object CustomData { get; set; }Free slot for extra data to send along.
ulong FailedPackets { get; }Packets that failed to send.
int FirebugCount { get; }Spawned firebugs.
string Fleet { get; }The server's fleet name.
ulong FloodedPackets { get; }Packets dropped for flooding.
float FPS { get; }Average server frame rate since the last reset.
int GoteraCount { get; }Spawned goteras.
float IncomingPacketsPerSecond { get; }Incoming packets per second, as of the last Cache.
int LinkWithEntitiesCount { get; }Entity links that currently hold an entity.
float MessagesPerConnectionCount { get; }Average messages per connection per send.
int NetworkEntitiesCount { get; }Spawned network entities.
float NetworkingSending { get; }Average ms spent sending.
int NetworkPrefabsCount { get; }Spawned network prefabs.
int NetworkRigidbodiesAwakeCount { get; }Network rigidbodies that are awake.
int NetworkRigidbodiesCount { get; }Spawned network rigidbodies.
float OutgoingPacketsPerSecond { get; }Outgoing packets per second, as of the last Cache.
int OutgoingQueueSize { get; }Size of the socket's outgoing queue.
int PhantomCount { get; }Spawned phantoms.
string Platform { get; }Always "pc".
int PlayerCount { get; }Players on the server.
Dictionary<string, AccumulativeAverageCount> PrepareForWrite { get; }Per-type timers for preparing entities to be written.
ulong QueueLimitPackets { get; }Packets dropped for hitting the queue limit.
long RAM { get; }Process memory use.
ReceivingMetrics Receiving { get; }Metrics for received data.
string Region { get; }The server's region.
ulong ReliableOverflowDisconnects { get; }Players disconnected for overflowing the reliable packet buffer.
ulong SentPackets { get; }Packets sent.
Dictionary<string, AccumulativeAverageCount> Serialization { get; }Per-type serialization timers.
float SerializeToConnectionsMs { get; }Average ms spent serializing to connections.
string ServerTransportVersion { get; }Network transport package version, or "Unknown".
int SpriggullCount { get; }Spawned spriggulls.
float TimeSinceServerStart { get; }Seconds from creation to the last Cache.
float TotalPreparationCount { get; }Total entries across the prepare timers.
float TotalPrepareDuration { get; }Ms spent preparing entity serialization.
float TotalSerialization { get; }Average ms of scene serialization.
float TotalSerializationCount { get; }Total entries across the serialization timers.
float TotalSerializationDuration { get; }Ms spent serializing entities.
int TurabadaCount { get; }Spawned turabadas.
int UintPooledArrayRequestedCount { get; }Pooled uint arrays currently borrowed.
Dictionary<string, UpdateModuleInfo> UpdateModules { get; }Timing info for every update module, by name.
int WyrmCount { get; }Spawned wyrms.

Methods​

MemberWhat it is
void Cache()Stores the current time and caches the networking profiler values. Call before reading.
void ResetAll()Clears all averages and timers. Called after each send.

Used in​

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