template<typename T>
vt::runtime::component::detail::DiagnosticSnapshotValues struct

A list of diagnostic values that apply over a certain timeframe for a given snapshot.

Constructors, destructors, conversion operators

DiagnosticSnapshotValues(int n_snapshots, T in_initial_value)
Construct a set of value snapshots.

Public functions

void update(T val, DiagnosticUpdate updater)
Update the value.
auto operator[](int snapshot) -> DiagnosticValueWrapper<T>&
Get a value for a given snapshot.
auto operator[](int snapshot) const -> DiagnosticValueWrapper<T> const &
Get a value as const for a given snapshot.
void reset(int snapshot)
Reset a snapshot.
template<typename SerializerT>
void serialize(SerializerT& s)

Protected variables

T initial_value_
std::vector<DiagnosticValueWrapper<T>> snapshots_

Function documentation

template<typename T>
vt::runtime::component::detail::DiagnosticSnapshotValues<T>::DiagnosticSnapshotValues(int n_snapshots, T in_initial_value)

Construct a set of value snapshots.

Parameters
n_snapshots in the number of snapshots
in_initial_value in the initial value for a snapshot

template<typename T>
void vt::runtime::component::detail::DiagnosticSnapshotValues<T>::update(T val, DiagnosticUpdate updater)

Update the value.

Parameters
val in new value, updated based on type of DiagnosticUpdate
updater

template<typename T>
DiagnosticValueWrapper<T>& vt::runtime::component::detail::DiagnosticSnapshotValues<T>::operator[](int snapshot)

Get a value for a given snapshot.

Parameters
snapshot in the snapshot index
Returns the value wrapper

template<typename T>
DiagnosticValueWrapper<T> const & vt::runtime::component::detail::DiagnosticSnapshotValues<T>::operator[](int snapshot) const

Get a value as const for a given snapshot.

Parameters
snapshot in the snapshot index
Returns the const value wrapper

template<typename T>
void vt::runtime::component::detail::DiagnosticSnapshotValues<T>::reset(int snapshot)

Reset a snapshot.

Parameters
snapshot in the snapshot index

\internalThis is typically invoked when a snapshot's timeframe expires and it needs to be reset for computing the value for the next snapshot.

Variable documentation

template<typename T>
T vt::runtime::component::detail::DiagnosticSnapshotValues<T>::initial_value_ protected

Save for later reset

template<typename T>
std::vector<DiagnosticValueWrapper<T>> vt::runtime::component::detail::DiagnosticSnapshotValues<T>::snapshots_ protected

Value time snapshots