Table of Contents

Struct TickOutcome

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Outcome of the most recently completed tick, exposed by LastTickOutcome and passed to OnTickAborted.

public readonly struct TickOutcome
Inherited Members

Remarks

This is a tick-level verdict, not a system-level one, and it is refreshed on every tick under every policy — a stale outcome can never be mistaken for a fresh one. Overload shedding never produces a non-Succeeded outcome: a shed system is skipped by design, not by failure. Degradation is read from the overload level; failure is read from here. The two are orthogonal.

Constructors

TickOutcome(long, TickOutcomeReason, int, string, Exception)

Creates an outcome. Use ForSuccess(long) for the success case.

public TickOutcome(long tickNumber, TickOutcomeReason reason, int failedSystemIndex, string failedSystemName, Exception failedSystemException)

Parameters

tickNumber long

The tick this outcome describes.

reason TickOutcomeReason

Why the tick ended the way it did.

failedSystemIndex int

Index of the first failing system, or -1.

failedSystemName string

Name of the first failing system, or null.

failedSystemException Exception

The exception that ended the tick, or null.

Properties

FailedSystemException

The exception that ended the tick, or null when Succeeded is true.

public Exception FailedSystemException { get; }

Property Value

Exception

FailedSystemIndex

Index of the first system to fail, or -1 when Succeeded is true.

public int FailedSystemIndex { get; }

Property Value

int

FailedSystemName

Name of the first system to fail, or null when Succeeded is true.

public string FailedSystemName { get; }

Property Value

string

Reason

Why the tick ended the way it did.

public TickOutcomeReason Reason { get; }

Property Value

TickOutcomeReason

Succeeded

True when the tick completed as its policy promises.

public bool Succeeded { get; }

Property Value

bool

TickNumber

The tick this outcome describes.

public long TickNumber { get; }

Property Value

long

Methods

ForSuccess(long)

Creates the outcome for a tick that completed as its policy promises.

public static TickOutcome ForSuccess(long tickNumber)

Parameters

tickNumber long

The tick this outcome describes.

Returns

TickOutcome