FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::KillState Struct Reference

Cumulative risk state across sessions. More...

#include <fastmm/core/session_state.hpp>

Public Member Functions

Notional carry () const noexcept
 The carry [risk] max_loss is measured against, on top of the running session's PnL.
 

Public Attributes

bool latched = false
 a max-loss trip is latched: refuse to start until an operator clears it
 
KillReason reason = KillReason::None
 
Notional realized {}
 
Notional fees {}
 
std::uint64_t sessions = 0
 
std::int64_t updated_ns = 0
 wall clock of the last write
 

Detailed Description

Cumulative risk state across sessions.

realized and fees are the sum over every session since the file was last cleared, so [risk] max_loss is a budget for the deployment rather than per process. Unrealized PnL is not carried; it is remeasured from the venue's position after the restart.

Member Function Documentation

◆ carry()

Notional fastmm::KillState::carry ( ) const
inlinenoexcept

The carry [risk] max_loss is measured against, on top of the running session's PnL.

Member Data Documentation

◆ latched

bool fastmm::KillState::latched = false

a max-loss trip is latched: refuse to start until an operator clears it

◆ reason

KillReason fastmm::KillState::reason = KillReason::None

◆ realized

Notional fastmm::KillState::realized {}

◆ fees

Notional fastmm::KillState::fees {}

◆ sessions

std::uint64_t fastmm::KillState::sessions = 0

◆ updated_ns

std::int64_t fastmm::KillState::updated_ns = 0

wall clock of the last write