TelemetryMonitor Class
Records board telemetry from Sentinel between start() and stop(). More...
Declaration
Included Headers
Friends Index
| struct | internal::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
| void | start () |
|
Start a new window from zero. More... | |
| Telemetry | read () const |
|
The summary so far, without stopping or contacting Sentinel. After stop(), its result. More... | |
| Telemetry | stop () |
|
Stop the window and return the final summary, including Sentinel's newest sample taken before this call. More... | |
| bool | running () const |
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.
Definition at line 119 of file TelemetryMonitor.h.
Friends
internal::TelemetryMonitorAccess
|
Definition at line 146 of file TelemetryMonitor.h.
Public Constructors
TelemetryMonitor()
|
Create a stopped monitor; contacts nothing until start().
Definition at line 122 of file TelemetryMonitor.h.
TelemetryMonitor()
| 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()
| delete |
Definition at line 128 of file TelemetryMonitor.h.
TelemetryMonitor()
| noexcept |
Definition at line 131 of file TelemetryMonitor.h.
Public Destructor
~TelemetryMonitor()
|
Definition at line 126 of file TelemetryMonitor.h.
Public Operators
operator=()
| delete |
Definition at line 129 of file TelemetryMonitor.h.
operator=()
| noexcept |
Definition at line 132 of file TelemetryMonitor.h.
Public Member Functions
read()
|
The summary so far, without stopping or contacting Sentinel. After stop(), its result.
Definition at line 138 of file TelemetryMonitor.h.
running()
|
True between start() and stop().
Definition at line 143 of file TelemetryMonitor.h.
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()
|
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_
|
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.