#include <RemoteViz/Rendering/Monitoring.h>
Public Types | |
enum | MetricType { NONE = 0x00 , NETWORK_LATENCY = 0x1 , DECODING_TIME = 0x2 , RENDERING_TIME = 0x4 , ENCODING_TIME = 0x8 , NUM_CLIENTS = 0x10 , NUM_CONNECTIONS = 0x20 , NUM_RENDERAREAS = 0x40 , ALL = 0xFFFF } |
Types of metrics. More... | |
Public Member Functions | |
void | addListener (std::shared_ptr< MetricsListener > listener) |
Adds a listener for metrics. | |
void | removeListener (std::shared_ptr< MetricsListener > listener) |
Removes a listener for metrics. | |
unsigned int | getNumListeners () const |
Return the number of listeners. | |
void | enableMetrics (unsigned int mask) |
Enable metrics By default, all metrics are disabled. | |
bool | isMetricEnabled (MetricType metric) const |
Check if a metric is enabled. | |
This class enables to manage metrics listeners that monitor states and performance of the service.
A Monitoring object is automatically created by RemoteViz. Use the Service::getMonitoring() method to get this object and (for example) add a listener.
See $OIVHOME/examples/source/RemoteViz/Monitoring
Definition at line 50 of file Monitoring.h.
Types of metrics.
Enumerator | |
---|---|
NONE | No metrics. |
NETWORK_LATENCY | Network latency: Reported every 1 second. |
DECODING_TIME | Decoding time: Reported each time a frame is sent to the client. |
RENDERING_TIME | Rendering time: Reported each time a frame is rendered. |
ENCODING_TIME | Encoding time: Reported each time a frame is sent to the client. |
NUM_CLIENTS | Number of clients: Reported when a client is added or removed. |
NUM_CONNECTIONS | Number of connections: Reported when a connection is added or removed. |
NUM_RENDERAREAS | Number of render areas: Reported when a render area is added or removed. |
ALL | All metrics. |
Definition at line 63 of file Monitoring.h.
void RemoteViz::Rendering::Monitoring::addListener | ( | std::shared_ptr< MetricsListener > | listener | ) |
Adds a listener for metrics.
listener | : object that listens to the service metrics. |
void RemoteViz::Rendering::Monitoring::enableMetrics | ( | unsigned int | mask | ) |
Enable metrics By default, all metrics are disabled.
mask | : binary mask of MetricType |
unsigned int RemoteViz::Rendering::Monitoring::getNumListeners | ( | ) | const |
Return the number of listeners.
bool RemoteViz::Rendering::Monitoring::isMetricEnabled | ( | MetricType | metric | ) | const |
Check if a metric is enabled.
metric | : metric to check |
Return true if the metric is enabled, false otherwise
void RemoteViz::Rendering::Monitoring::removeListener | ( | std::shared_ptr< MetricsListener > | listener | ) |
Removes a listener for metrics.
listener | : object that listens to the service metrics. |