Diagnostics of performance of a filter chain. More...
#include <filter_chain_nodelet.hpp>
Public Member Functions | |
void | addReport (const ::std::string &filterName, bool success) |
Call this function every time a filter finished callback is called. More... | |
FilterChainDiagnostics (const ::std::string &name, const ::cras::FilterChain< F > &chain) | |
void | run (::diagnostic_updater::DiagnosticStatusWrapper &stat) override |
Public Member Functions inherited from diagnostic_updater::DiagnosticTask | |
DiagnosticTask (const std::string name) | |
const std::string & | getName () |
virtual void | run (diagnostic_updater::DiagnosticStatusWrapper &stat)=0 |
virtual | ~DiagnosticTask () |
Protected Attributes | |
const ::cras::FilterChain< F > & | chain |
The diagnosed chain. More... | |
::std::mutex | mutex |
Mutex protecting numCallbacks, numSuccesses and numFailures. More... | |
::std::unordered_map<::std::string, size_t > | numCallbacks |
The overall number of callbacks since last update. More... | |
::std::unordered_map<::std::string, size_t > | numFailures |
The number of failed filter runs since last update. More... | |
::std::unordered_map<::std::string, size_t > | numSuccesses |
The number of successful filter runs since last update. More... | |
Diagnostics of performance of a filter chain.
F | Type of filtered data. |
Definition at line 44 of file filter_utils/filter_chain_nodelet.hpp.
cras::FilterChainDiagnostics< F >::FilterChainDiagnostics | ( | const ::std::string & | name, |
const ::cras::FilterChain< F > & | chain | ||
) |
[in] | name | Name of the diagnostic task. |
[in] | chain | The diagnosed chain. |
void cras::FilterChainDiagnostics< F >::addReport | ( | const ::std::string & | filterName, |
bool | success | ||
) |
Call this function every time a filter finished callback is called.
[in] | filterName | Name of the filter. |
[in] | success | Whether the filter has succeeded. |
|
override |
|
protected |
The diagnosed chain.
Definition at line 342 of file filter_utils/filter_chain_nodelet.hpp.
|
protected |
Mutex protecting numCallbacks, numSuccesses and numFailures.
Definition at line 345 of file filter_utils/filter_chain_nodelet.hpp.
|
protected |
The overall number of callbacks since last update.
Definition at line 348 of file filter_utils/filter_chain_nodelet.hpp.
|
protected |
The number of failed filter runs since last update.
Definition at line 354 of file filter_utils/filter_chain_nodelet.hpp.
|
protected |
The number of successful filter runs since last update.
Definition at line 351 of file filter_utils/filter_chain_nodelet.hpp.