Table of Contents

Class Stats

Namespace
Nyra.Entities
Assembly
Nyra.dll

Statistics of an audio node, from the stats websocket operation or GET /v4/stats.

public sealed record Stats : IEquatable<Stats>
Inheritance
Stats
Implements
Inherited Members

Properties

Cpu

CPU statistics of the server.

[JsonPropertyName("cpu")]
[JsonInclude]
public CpuStats Cpu { get; }

Property Value

CpuStats

Remarks

Absorbs a null the server sends, the setter substitutes an empty instance.

DetailedStats

In-memory counter snapshot NodeLink appends to GET /v4/stats, request and error totals per API endpoint, success and failure totals per source, and playback event totals.

[JsonPropertyName("detailedStats")]
[JsonInclude]
public DetailedStats? DetailedStats { get; }

Property Value

DetailedStats

Remarks

Null on Lavalink and on the websocket path, the counters are lifetime totals reset only by a server restart.

FrameStats

Null when the server reports no frame statistics.

[JsonPropertyName("frameStats")]
[JsonInclude]
public FrameStats? FrameStats { get; }

Property Value

FrameStats

Remarks

NodeLink sends the member as null when no player exists at all, it does not omit the field.

Lavalink sends it as null over REST, where it has no session to read frame counters from, and on the websocket until the session has playing players with a full minute of continuous playback. A non-zero playing count can still arrive with null frames.

Memory

Memory statistics of the server.

[JsonPropertyName("memory")]
[JsonInclude]
public MemoryStats Memory { get; }

Property Value

MemoryStats

Remarks

Absorbs a null the server sends, the setter substitutes an empty instance.

Players

The players the server hosts.

[JsonPropertyName("players")]
[JsonInclude]
public int Players { get; }

Property Value

int

PlayingPlayers

The players with a track playing.

[JsonPropertyName("playingPlayers")]
[JsonInclude]
public int PlayingPlayers { get; }

Property Value

int

Uptime

Uptime in milliseconds.

[JsonPropertyName("uptime")]
[JsonInclude]
[JsonConverter(typeof(RoundedInt64Converter))]
public long Uptime { get; }

Property Value

long

UptimeDuration

How long the server has been running.

[JsonIgnore]
public TimeSpan UptimeDuration { get; }

Property Value

TimeSpan

Remarks

Zero for a value outside the range a TimeSpan can represent, the raw Uptime still carries it. The zero is indistinguishable from a node that just started.