Table of Contents

Struct RealmStat

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

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

Realm ushort

The realm's id.

Generation int

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.

Kind string

The realm kind its replication declared, which picks its sessions' profile variants; "" for the default kind.

State RealmRunState

Active, Simulated, Dormant or Closing, as the realm policy last evaluated it.

Served bool

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.

Divisor int

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.

Sessions int

Sessions in the realm at the moment of the read — a level, not a total.

Enters long

Entities delivered into its sessions' views, cumulative.

Updates long

Updates delivered to its sessions, cumulative.

Leaves long

Entities dropped from its sessions' views, cumulative.

CellsDelivered long

Replication cells its sessions were filled from, cumulative.

Resets long

Views re-sent whole to its sessions — a realm switch, a slot reuse, a gap, cumulative.

Events long

Events routed to its sessions, cumulative.

Properties

CellsDelivered

Replication cells its sessions were filled from, cumulative.

public long CellsDelivered { get; init; }

Property Value

long

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

int

Enters

Entities delivered into its sessions' views, cumulative.

public long Enters { get; init; }

Property Value

long

Events

Events routed to its sessions, cumulative.

public long Events { get; init; }

Property Value

long

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

int

Kind

The realm kind its replication declared, which picks its sessions' profile variants; "" for the default kind.

public string Kind { get; init; }

Property Value

string

Leaves

Entities dropped from its sessions' views, cumulative.

public long Leaves { get; init; }

Property Value

long

Realm

The realm's id.

public ushort Realm { get; init; }

Property Value

ushort

Resets

Views re-sent whole to its sessions — a realm switch, a slot reuse, a gap, cumulative.

public long Resets { get; init; }

Property Value

long

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

bool

Sessions

Sessions in the realm at the moment of the read — a level, not a total.

public int Sessions { get; init; }

Property Value

int

State

Active, Simulated, Dormant or Closing, as the realm policy last evaluated it.

public RealmRunState State { get; init; }

Property Value

RealmRunState

Updates

Updates delivered to its sessions, cumulative.

public long Updates { get; init; }

Property Value

long

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

long

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

Realm ushort
Generation int
Kind string
State RealmRunState
Served bool
Divisor int
Sessions int
Enters long
Updates long
Leaves long
CellsDelivered long
Resets long
Events long

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(RealmStat)

public bool Equals(RealmStat other)

Parameters

other RealmStat

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(RealmStat, RealmStat)

public static bool operator ==(RealmStat left, RealmStat right)

Parameters

left RealmStat
right RealmStat

Returns

bool

operator !=(RealmStat, RealmStat)

public static bool operator !=(RealmStat left, RealmStat right)

Parameters

left RealmStat
right RealmStat

Returns

bool