Struct RealmStat
One realm: what it is, what it is doing, and the replication work its sessions have been served.
public readonly struct RealmStat : IEquatable<RealmStat>
- Implements
- Inherited Members
Constructors
RealmStat(ushort, int, string, RealmRunState, bool, int, int, long, long, long, long, long, long)
One realm: what it is, what it is doing, and the replication work its sessions have been served.
public RealmStat(ushort Realm, int Generation, string Kind, RealmRunState State, bool Served, int Divisor, int Sessions, long Enters, long Updates, long Leaves, long CellsDelivered, long Resets, long Events)
Parameters
RealmushortThe realm's id.
GenerationintWhich incarnation of that id this is. A realm's identity is the PAIR (12-realms § 1.1): ids are reused across an open, so a reader comparing by id alone can take a reused id for the realm it replaced.
KindstringThe realm kind its replication declared, which picks its sessions' profile variants;
""for the default kind.StateRealmRunStateActive, Simulated, Dormant or Closing, as the realm policy last evaluated it.
ServedboolWhether the realm has replication state at all. False is not an error and is the usual case at scale: a realm no session is in is dropped by the hub, so every work figure below is structurally zero rather than measured zero.
DivisorintIts simulation rate divisor this tick: 1 while it is observed, its
RealmConfig.UnobservedTickDivisorotherwise. A realm at 4 has its clusters dispatched once every fourth tick.SessionsintSessions in the realm at the moment of the read — a level, not a total.
EnterslongEntities delivered into its sessions' views, cumulative.
UpdateslongUpdates delivered to its sessions, cumulative.
LeaveslongEntities dropped from its sessions' views, cumulative.
CellsDeliveredlongReplication cells its sessions were filled from, cumulative.
ResetslongViews re-sent whole to its sessions — a realm switch, a slot reuse, a gap, cumulative.
EventslongEvents routed to its sessions, cumulative.
Properties
CellsDelivered
Replication cells its sessions were filled from, cumulative.
public long CellsDelivered { get; init; }
Property Value
Divisor
Its simulation rate divisor this tick: 1 while it is observed, its RealmConfig.UnobservedTickDivisor otherwise. A realm at 4 has its clusters
dispatched once every fourth tick.
public int Divisor { get; init; }
Property Value
Enters
Entities delivered into its sessions' views, cumulative.
public long Enters { get; init; }
Property Value
Events
Events routed to its sessions, cumulative.
public long Events { get; init; }
Property Value
Generation
Which incarnation of that id this is. A realm's identity is the PAIR (12-realms § 1.1): ids are reused across an open, so a reader comparing by id alone can take a reused id for the realm it replaced.
public int Generation { get; init; }
Property Value
Kind
The realm kind its replication declared, which picks its sessions' profile variants; "" for the default kind.
public string Kind { get; init; }
Property Value
Leaves
Entities dropped from its sessions' views, cumulative.
public long Leaves { get; init; }
Property Value
Realm
The realm's id.
public ushort Realm { get; init; }
Property Value
Resets
Views re-sent whole to its sessions — a realm switch, a slot reuse, a gap, cumulative.
public long Resets { get; init; }
Property Value
Served
Whether the realm has replication state at all. False is not an error and is the usual case at scale: a realm no session is in is dropped by the hub, so every work figure below is structurally zero rather than measured zero.
public bool Served { get; init; }
Property Value
Sessions
Sessions in the realm at the moment of the read — a level, not a total.
public int Sessions { get; init; }
Property Value
State
Active, Simulated, Dormant or Closing, as the realm policy last evaluated it.
public RealmRunState State { get; init; }
Property Value
Updates
Updates delivered to its sessions, cumulative.
public long Updates { get; init; }
Property Value
Work
Every work figure summed: zero means this realm has cost its sessions nothing at all since the process started.
public long Work { get; }
Property Value
Remarks
One number to assert against, because the claim "an unobserved realm is free" is about all of them at once and a check that named five of six would be a check that passed when the sixth moved.
Methods
Deconstruct(out ushort, out int, out string, out RealmRunState, out bool, out int, out int, out long, out long, out long, out long, out long, out long)
public void Deconstruct(out ushort Realm, out int Generation, out string Kind, out RealmRunState State, out bool Served, out int Divisor, out int Sessions, out long Enters, out long Updates, out long Leaves, out long CellsDelivered, out long Resets, out long Events)
Parameters
RealmushortGenerationintKindstringStateRealmRunStateServedboolDivisorintSessionsintEnterslongUpdateslongLeaveslongCellsDeliveredlongResetslongEventslong
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
Equals(RealmStat)
public bool Equals(RealmStat other)
Parameters
otherRealmStat
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(RealmStat, RealmStat)
public static bool operator ==(RealmStat left, RealmStat right)
Parameters
Returns
operator !=(RealmStat, RealmStat)
public static bool operator !=(RealmStat left, RealmStat right)