|
MADARA
3.1.8
|
Filter for discovering neighboring peers. More...
#include <CounterFilter.h>


Public Member Functions | |
| CounterFilter () | |
| Constructor. More... | |
| virtual | ~CounterFilter () |
| Destructor. More... | |
| virtual void | filter (knowledge::KnowledgeMap &records, const transport::TransportContext &transport_context, knowledge::Variables &vars) |
| Adds to the counter. More... | |
| knowledge::KnowledgeRecord::Integer | get_count () |
| Gets the number of packets filtered. More... | |
| knowledge::KnowledgeRecord::Integer | get_elapsed () |
| Returns the duration of filtering from first to last message in seconds. More... | |
| double | get_throughput () |
| Returns the throughput in terms of packets/second. More... | |
Protected Attributes | |
| knowledge::KnowledgeRecord::Integer | first_message_ |
| The time to keep record of a peer. More... | |
| bool | initialized_ |
| Tracks if the first timer has been initialized. More... | |
| knowledge::KnowledgeRecord::Integer | last_message_ |
| The time of the last clear of the peer_list. More... | |
| knowledge::KnowledgeRecord::Integer | packets_ |
| A map of discovered peers. More... | |
Filter for discovering neighboring peers.
Definition at line 37 of file CounterFilter.h.
| madara::filters::CounterFilter::CounterFilter | ( | ) |
Constructor.
Definition at line 7 of file CounterFilter.cpp.
|
virtual |
Destructor.
Definition at line 13 of file CounterFilter.cpp.
|
virtual |
Adds to the counter.
| records | the aggregate records vector |
| transport_context | context for querying transport state |
| vars | context for querying current program state |
Implements madara::filters::AggregateFilter.
Definition at line 19 of file CounterFilter.cpp.
|
inline |
Gets the number of packets filtered.
Definition at line 7 of file CounterFilter.inl.
|
inline |
Returns the duration of filtering from first to last message in seconds.
Definition at line 13 of file CounterFilter.inl.
|
inline |
Returns the throughput in terms of packets/second.
Definition at line 25 of file CounterFilter.inl.
|
protected |
The time to keep record of a peer.
Definition at line 94 of file CounterFilter.h.
|
protected |
Tracks if the first timer has been initialized.
Definition at line 84 of file CounterFilter.h.
|
protected |
The time of the last clear of the peer_list.
Definition at line 99 of file CounterFilter.h.
|
protected |
A map of discovered peers.
Definition at line 89 of file CounterFilter.h.