#include <ConsumerMonitorCollection.h>
Classes | |
struct | TotalStats |
Public Member Functions | |
void | addDroppedEvents (const QueueID &, const size_t &count) |
void | addQueuedEventSample (const QueueID &, const unsigned int &data_size) |
void | addServedEventSample (const QueueID &, const unsigned int &data_size) |
ConsumerMonitorCollection (const utils::Duration_t &updateInterval, const utils::Duration_t &recentDuration) | |
bool | getDropped (const QueueID &qid, MonitoredQuantity::Stats &result) const |
bool | getQueued (const QueueID &qid, MonitoredQuantity::Stats &result) const |
bool | getServed (const QueueID &qid, MonitoredQuantity::Stats &result) const |
void | getTotalStats (TotalStats &) const |
void | resetCounters () |
Public Member Functions inherited from stor::MonitorCollection | |
void | appendInfoSpaceItems (InfoSpaceItems &) |
void | calculateStatistics (const utils::TimePoint_t &now) |
MonitorCollection (const utils::Duration_t &updateInterval) | |
void | reset (const utils::TimePoint_t &now) |
void | updateInfoSpaceItems () |
virtual | ~MonitorCollection () |
Protected Attributes | |
ConsStatMap | dmap_ |
boost::mutex | mutex_ |
ConsStatMap | qmap_ |
ConsStatMap | smap_ |
Private Types | |
typedef std::map< QueueID, MonitoredQuantityPtr > | ConsStatMap |
Private Member Functions | |
void | addEventSampleToMap (const QueueID &, const unsigned int &data_size, ConsStatMap &) |
ConsumerMonitorCollection (const ConsumerMonitorCollection &) | |
virtual void | do_calculateStatistics () |
virtual void | do_reset () |
bool | getValueFromMap (const QueueID &, MonitoredQuantity::Stats &, const ConsStatMap &) const |
ConsumerMonitorCollection & | operator= (const ConsumerMonitorCollection &) |
Private Attributes | |
const utils::Duration_t | recentDuration_ |
MonitoredQuantity | totalDroppedMQ_ |
MonitoredQuantity | totalQueuedMQ_ |
MonitoredQuantity | totalServedMQ_ |
const utils::Duration_t | updateInterval_ |
Additional Inherited Members | |
Public Types inherited from stor::MonitorCollection | |
typedef std::vector< std::pair < std::string, xdata::Serializable * > > | InfoSpaceItems |
Protected Member Functions inherited from stor::MonitorCollection | |
virtual void | do_appendInfoSpaceItems (InfoSpaceItems &) |
virtual void | do_updateInfoSpaceItems () |
A collection of MonitoredQuantities to track consumer activity.
Definition at line 28 of file ConsumerMonitorCollection.h.
|
private |
Definition at line 92 of file ConsumerMonitorCollection.h.
|
explicit |
Definition at line 12 of file ConsumerMonitorCollection.cc.
|
private |
void stor::ConsumerMonitorCollection::addDroppedEvents | ( | const QueueID & | qid, |
const size_t & | count | ||
) |
Add number of dropped events
Definition at line 38 of file ConsumerMonitorCollection.cc.
References prof2calltree::l.
|
private |
Definition at line 62 of file ConsumerMonitorCollection.cc.
References pos.
void stor::ConsumerMonitorCollection::addQueuedEventSample | ( | const QueueID & | qid, |
const unsigned int & | data_size | ||
) |
Add queued sample
Definition at line 26 of file ConsumerMonitorCollection.cc.
References prof2calltree::l.
void stor::ConsumerMonitorCollection::addServedEventSample | ( | const QueueID & | qid, |
const unsigned int & | data_size | ||
) |
Add served sample
Definition at line 50 of file ConsumerMonitorCollection.cc.
References prof2calltree::l.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 164 of file ConsumerMonitorCollection.cc.
References stor::MonitoredQuantity::calculateStatistics(), dmap_, i, prof2calltree::l, mutex_, qmap_, smap_, totalDroppedMQ_, totalQueuedMQ_, and totalServedMQ_.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 180 of file ConsumerMonitorCollection.cc.
References dmap_, prof2calltree::l, mutex_, qmap_, stor::MonitoredQuantity::reset(), smap_, totalDroppedMQ_, totalQueuedMQ_, and totalServedMQ_.
bool stor::ConsumerMonitorCollection::getDropped | ( | const QueueID & | qid, |
MonitoredQuantity::Stats & | result | ||
) | const |
Get number of dropped events. Return false if consumer ID not found.
Definition at line 116 of file ConsumerMonitorCollection.cc.
References prof2calltree::l.
bool stor::ConsumerMonitorCollection::getQueued | ( | const QueueID & | qid, |
MonitoredQuantity::Stats & | result | ||
) | const |
Get queued data size. Return false if consumer ID not found.
Definition at line 94 of file ConsumerMonitorCollection.cc.
References prof2calltree::l.
bool stor::ConsumerMonitorCollection::getServed | ( | const QueueID & | qid, |
MonitoredQuantity::Stats & | result | ||
) | const |
Get served data size. Return false if consumer ID not found.
Definition at line 105 of file ConsumerMonitorCollection.cc.
References prof2calltree::l.
Referenced by smproxy::SMPSWebPageHelper::addRowForEventType(), and stor::SMWebPageHelper::getServedConsumerBandwidth().
void stor::ConsumerMonitorCollection::getTotalStats | ( | TotalStats & | totalStats | ) | const |
Get the summary statistics for all consumers
Definition at line 141 of file ConsumerMonitorCollection.cc.
References stor::ConsumerMonitorCollection::TotalStats::droppedStats, stor::MonitoredQuantity::getStats(), stor::ConsumerMonitorCollection::TotalStats::queuedStats, stor::ConsumerMonitorCollection::TotalStats::servedStats, totalDroppedMQ_, totalQueuedMQ_, and totalServedMQ_.
Referenced by smproxy::SMPSWebPageHelper::addSummaryRowForThroughput().
|
private |
Definition at line 126 of file ConsumerMonitorCollection.cc.
References pos.
|
private |
void stor::ConsumerMonitorCollection::resetCounters | ( | ) |
Reset sizes to zero leaving consumers in
Definition at line 148 of file ConsumerMonitorCollection.cc.
References dmap_, i, prof2calltree::l, mutex_, qmap_, stor::MonitoredQuantity::reset(), smap_, totalDroppedMQ_, totalQueuedMQ_, and totalServedMQ_.
|
protected |
Definition at line 109 of file ConsumerMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), and resetCounters().
|
mutableprotected |
Definition at line 112 of file ConsumerMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), stor::DQMConsumerMonitorCollection::do_updateInfoSpaceItems(), stor::EventConsumerMonitorCollection::do_updateInfoSpaceItems(), and resetCounters().
|
protected |
Definition at line 108 of file ConsumerMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), and resetCounters().
|
private |
Definition at line 101 of file ConsumerMonitorCollection.h.
|
protected |
Definition at line 110 of file ConsumerMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), stor::DQMConsumerMonitorCollection::do_updateInfoSpaceItems(), stor::EventConsumerMonitorCollection::do_updateInfoSpaceItems(), and resetCounters().
|
private |
Definition at line 103 of file ConsumerMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), getTotalStats(), and resetCounters().
|
private |
Definition at line 102 of file ConsumerMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), getTotalStats(), and resetCounters().
|
private |
Definition at line 104 of file ConsumerMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), getTotalStats(), and resetCounters().
|
private |
Definition at line 100 of file ConsumerMonitorCollection.h.