Table of Contents

Class BuiltInMetrics

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

The metrics every Typhon server can publish (W25), at reserved indices 0–31 under the reserved typhon. prefix. Durations travel in milliseconds as f16: microseconds would overflow a half at 65 ms.

public static class BuiltInMetrics
Inheritance
BuiltInMetrics
Inherited Members

Fields

ArchetypeEntities

Entities per replicated archetype; its labels are the archetype names, in index order.

public const string ArchetypeEntities = "typhon.archetype.entities"

Field Value

string

SystemMean

Per-system mean duration; its labels are the system names, in schedule order.

public const string SystemMean = "typhon.system.mean"

Field Value

string

Properties

Count

The number of built-in metrics defined today.

public static int Count { get; }

Property Value

int

Methods

Create(int, string[])

Builds the definition of the built-in metric at idx.

public static CatalogMetric Create(int idx, string[] labels = null)

Parameters

idx int

The reserved index, in [0, Count).

labels string[]

The labels, for SystemMean and ArchetypeEntities; otherwise null.

Returns

CatalogMetric

The metric definition.

HasShape(int, CatalogMetric)

Whether metric is shaped exactly as Create(int, string[]) builds the built-in at idx.

public static bool HasShape(int idx, CatalogMetric metric)

Parameters

idx int

The built-in's reserved index.

metric CatalogMetric

A metric carrying that built-in's name.

Returns

bool

true when unit, codec, kind, scope and the presence of labels all match.

ReservedIdx(string)

The reserved index of a built-in metric, or −1 when name is not one.

public static int ReservedIdx(string name)

Parameters

name string

The metric name.

Returns

int

The reserved index, or −1.