メインコンテンツまでスキップ

TelemetryMonitor Class

Records board telemetry from Sentinel between start() and stop(). More...

Declaration​

class simaai::neat::TelemetryMonitor { ... }

Included Headers​

#include <TelemetryMonitor.h>

Friends Index​

structinternal::TelemetryMonitorAccess

Public Constructors Index​

TelemetryMonitor ()

Create a stopped monitor; contacts nothing until start(). More...

TelemetryMonitor (std::string socket_path)

Use an explicit Sentinel Unix socket instead of /run/simaai-sentinel/api.sock. More...

TelemetryMonitor (const TelemetryMonitor &)=delete
TelemetryMonitor (TelemetryMonitor &&) noexcept

Public Destructor Index​

~TelemetryMonitor ()

Public Operators Index​

TelemetryMonitor &operator= (const TelemetryMonitor &)=delete
TelemetryMonitor &operator= (TelemetryMonitor &&) noexcept

Public Member Functions Index​

voidstart ()

Start a new window from zero. More...

Telemetryread () const

The summary so far, without stopping or contacting Sentinel. After stop(), its result. More...

Telemetrystop ()

Stop the window and return the final summary, including Sentinel's newest sample taken before this call. More...

boolrunning () const

True between start() and stop(). More...

Private Member Attributes Index​

std::unique_ptr< Impl >impl_

Description​

Records board telemetry from Sentinel between start() and stop().

The monitor counts each Sentinel sample once into a running summary, so memory stays the same however long the window. It holds nothing in Sentinel: several monitors, in one process or many, and Model::benchmark() can run at the same time, and a killed process leaves nothing behind.

Never throws for Sentinel problems. When Sentinel cannot be read, the monitor warns once on stderr, status names the reason, and the monitor keeps retrying and counts samples once Sentinel answers. All methods are thread-safe. The destructor stops a running monitor.

 simaai::neat::TelemetryMonitor monitor;
 monitor.start();
 run_workload();
 const simaai::neat::Telemetry telemetry = monitor.stop();
 std::cout << telemetry;
 telemetry.save("telemetry.yaml");

Definition at line 119 of file TelemetryMonitor.h.

Friends​

internal::TelemetryMonitorAccess​

friend struct internal::TelemetryMonitorAccess

Definition at line 146 of file TelemetryMonitor.h.

Public Constructors​

TelemetryMonitor()​

simaai::neat::TelemetryMonitor::TelemetryMonitor ()

Create a stopped monitor; contacts nothing until start().

Definition at line 122 of file TelemetryMonitor.h.

TelemetryMonitor()​

simaai::neat::TelemetryMonitor::TelemetryMonitor (std::string socket_path)
explicit

Use an explicit Sentinel Unix socket instead of /run/simaai-sentinel/api.sock.

Creates a stopped monitor; contacts nothing until start().

Definition at line 125 of file TelemetryMonitor.h.

TelemetryMonitor()​

simaai::neat::TelemetryMonitor::TelemetryMonitor (const TelemetryMonitor &)
delete

Definition at line 128 of file TelemetryMonitor.h.

TelemetryMonitor()​

simaai::neat::TelemetryMonitor::TelemetryMonitor (TelemetryMonitor &&)
noexcept

Definition at line 131 of file TelemetryMonitor.h.

Public Destructor​

~TelemetryMonitor()​

simaai::neat::TelemetryMonitor::~TelemetryMonitor ()

Definition at line 126 of file TelemetryMonitor.h.

Public Operators​

operator=()​

TelemetryMonitor & simaai::neat::TelemetryMonitor::operator= (const TelemetryMonitor &)
delete

Definition at line 129 of file TelemetryMonitor.h.

operator=()​

TelemetryMonitor & simaai::neat::TelemetryMonitor::operator= (TelemetryMonitor &&)
noexcept

Definition at line 132 of file TelemetryMonitor.h.

Public Member Functions​

read()​

Telemetry simaai::neat::TelemetryMonitor::read ()

The summary so far, without stopping or contacting Sentinel. After stop(), its result.

Definition at line 138 of file TelemetryMonitor.h.

running()​

bool simaai::neat::TelemetryMonitor::running ()

True between start() and stop().

Definition at line 143 of file TelemetryMonitor.h.

start()​

void simaai::neat::TelemetryMonitor::start ()

Start a new window from zero.

Samples Sentinel took before this call are not counted. Does nothing while running.

Definition at line 136 of file TelemetryMonitor.h.

stop()​

Telemetry simaai::neat::TelemetryMonitor::stop ()

Stop the window and return the final summary, including Sentinel's newest sample taken before this call.

When already stopped, returns the previous result.

Definition at line 141 of file TelemetryMonitor.h.

Private Member Attributes​

impl_​

std::unique_ptr<Impl> simaai::neat::TelemetryMonitor::impl_

Definition at line 148 of file TelemetryMonitor.h.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.