class ConnectionStatisticsLogger:
Constructor: ConnectionStatisticsLogger(topic, subscriber, publisher)
Class that monitors lots of stuff for each connection.
is created whenever a subscriber is created. is destroyed whenever its parent subscriber is destroyed. its lifecycle is therefore bound to its parent subscriber.
Method | __init__ |
Constructor. |
Method | callback |
This method is called for every message, that is received on this subscriber. |
Method | send |
Send out statistics. Aggregate collected stats information. |
Method | shutdown |
Undocumented |
Instance Variable | age |
Undocumented |
Instance Variable | arrival |
Undocumented |
Instance Variable | dropped |
Undocumented |
Instance Variable | last |
Undocumented |
Instance Variable | last |
Undocumented |
Instance Variable | pub |
Undocumented |
Instance Variable | pub |
Undocumented |
Instance Variable | publisher |
Undocumented |
Instance Variable | stat |
Undocumented |
Instance Variable | stat |
Undocumented |
Instance Variable | subscriber |
Undocumented |
Instance Variable | topic |
Undocumented |
Instance Variable | window |
Undocumented |
Constructor.
@param topic: Name of the topic @param subscriber: Name of the subscriber @param publisher: Name of the publisher
These three should uniquely identify the connection.
This method is called for every message, that is received on this subscriber.
this callback will keep some statistics and publish the results periodically on a topic. the publishing should probably be done asynchronically in another thread.
@param msg: The message, that has been received. The message has usually been already deserialized. However this is not always the case. (AnyMsg) @param stat_bytes: A counter, how many bytes have been moved across this connection since it exists.
Any computing-heavy stuff should be done somewhere else, as this callback has to return before the message is delivered to the user.