#include <DataRetrieverMonitorCollection.h>
Classes | |
struct | DataRetrieverMQ |
class | EventTypeMqMap |
struct | EventTypeStats |
struct | SummaryStats |
Public Types | |
typedef std::map< std::string, stor::MonitoredQuantity::Stats > | ConnectionStats |
enum | ConnectionStatus { CONNECTED, CONNECTION_FAILED, DISCONNECTED, UNKNOWN } |
typedef std::vector < EventTypeStats > | EventTypeStatList |
Public Types inherited from stor::MonitorCollection | |
typedef std::vector< std::pair < std::string, xdata::Serializable * > > | InfoSpaceItems |
Public Member Functions | |
ConnectionID | addNewConnection (const stor::RegPtr) |
bool | addRetrievedSample (const ConnectionID &, const unsigned int &size) |
DataRetrieverMonitorCollection (const stor::utils::Duration_t &updateInterval) | |
bool | getEventTypeStatsForConnection (const ConnectionID &, EventTypeStats &) |
void | getStatsByConnection (ConnectionStats &) const |
void | getStatsByEventTypes (EventTypeStatList &) const |
void | getSummaryStats (SummaryStats &) const |
bool | setConnectionStatus (const ConnectionID &, const ConnectionStatus &) |
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 () |
Private Types | |
typedef std::map< std::string, stor::MonitoredQuantityPtr > | ConnectionMqMap |
typedef boost::shared_ptr < DataRetrieverMQ > | DataRetrieverMQPtr |
typedef std::map< ConnectionID, DataRetrieverMQPtr > | RetrieverMqMap |
Private Member Functions | |
DataRetrieverMonitorCollection (DataRetrieverMonitorCollection const &) | |
virtual void | do_calculateStatistics () |
virtual void | do_reset () |
DataRetrieverMonitorCollection & | operator= (DataRetrieverMonitorCollection const &) |
Additional Inherited Members | |
Protected Member Functions inherited from stor::MonitorCollection | |
virtual void | do_appendInfoSpaceItems (InfoSpaceItems &) |
virtual void | do_updateInfoSpaceItems () |
A collection of MonitoredQuantities related to data retrieval
Definition at line 33 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 130 of file DataRetrieverMonitorCollection.h.
typedef std::map<std::string, stor::MonitoredQuantity::Stats> smproxy::DataRetrieverMonitorCollection::ConnectionStats |
Definition at line 50 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 126 of file DataRetrieverMonitorCollection.h.
typedef std::vector<EventTypeStats> smproxy::DataRetrieverMonitorCollection::EventTypeStatList |
Definition at line 60 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 127 of file DataRetrieverMonitorCollection.h.
Enumerator | |
---|---|
CONNECTED | |
CONNECTION_FAILED | |
DISCONNECTED | |
UNKNOWN |
Definition at line 37 of file DataRetrieverMonitorCollection.h.
|
explicit |
Definition at line 17 of file DataRetrieverMonitorCollection.cc.
|
private |
ConnectionID smproxy::DataRetrieverMonitorCollection::addNewConnection | ( | const stor::RegPtr | regPtr | ) |
Add a new server connection. Returns an unique connection ID.
Definition at line 28 of file DataRetrieverMonitorCollection.cc.
References seconds().
bool smproxy::DataRetrieverMonitorCollection::addRetrievedSample | ( | const ConnectionID & | connectionId, |
const unsigned int & | size | ||
) |
Add a retrieved sample in Bytes from the given connection. Returns false if the ConnectionID is unknown.
Definition at line 86 of file DataRetrieverMonitorCollection.cc.
References findQualityFiles::size, and reco_skim_cfg_mod::sourceURL.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 168 of file DataRetrieverMonitorCollection.cc.
References stor::MonitoredQuantity::calculateStatistics(), smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::calculateStatistics(), connectionMqMap_, eventTypeMqMap_, retrieverMqMap_, statsMutex_, and totalSize_.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 190 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::clear(), connectionMqMap_, eventTypeMqMap_, stor::MonitoredQuantity::reset(), retrieverMqMap_, statsMutex_, and totalSize_.
bool smproxy::DataRetrieverMonitorCollection::getEventTypeStatsForConnection | ( | const ConnectionID & | connectionId, |
EventTypeStats & | stats | ||
) |
Put the event type statistics for the given consumer ID into the passed EventTypeStats. Return false if the connection ID is not found.
Definition at line 67 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::EventTypeStats::connectionStatus, pos, smproxy::DataRetrieverMonitorCollection::EventTypeStats::regPtr, and smproxy::DataRetrieverMonitorCollection::EventTypeStats::sizeStats.
void smproxy::DataRetrieverMonitorCollection::getStatsByConnection | ( | ConnectionStats & | cs | ) | const |
Write the data retrieval statistics for each connection into the given struct.
Definition at line 134 of file DataRetrieverMonitorCollection.cc.
References connectionMqMap_, and statsMutex_.
void smproxy::DataRetrieverMonitorCollection::getStatsByEventTypes | ( | EventTypeStatList & | etsl | ) | const |
Write the data retrieval statistics for each event type request into the given struct.
Definition at line 149 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::EventTypeStats::connectionStatus, smproxy::DataRetrieverMonitorCollection::EventTypeStats::regPtr, retrieverMqMap_, smproxy::DataRetrieverMonitorCollection::EventTypeStats::sizeStats, python.multivaluedict::sort(), and statsMutex_.
void smproxy::DataRetrieverMonitorCollection::getSummaryStats | ( | SummaryStats & | stats | ) | const |
Write the data retrieval summary statistics into the given struct.
Definition at line 113 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::SummaryStats::activeSMs, CONNECTED, eventTypeMqMap_, smproxy::DataRetrieverMonitorCollection::SummaryStats::eventTypeStats, stor::MonitoredQuantity::getStats(), smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::getStats(), smproxy::DataRetrieverMonitorCollection::SummaryStats::registeredSMs, retrieverMqMap_, smproxy::DataRetrieverMonitorCollection::SummaryStats::sizeStats, statsMutex_, and totalSize_.
|
private |
bool smproxy::DataRetrieverMonitorCollection::setConnectionStatus | ( | const ConnectionID & | connectionId, |
const ConnectionStatus & | status | ||
) |
Set status of given connection. Returns false if the ConnectionID is unknown.
Definition at line 53 of file DataRetrieverMonitorCollection.cc.
References pos, and ntuplemaker::status.
|
private |
Definition at line 131 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), and getStatsByConnection().
|
private |
Definition at line 174 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), and getSummaryStats().
|
private |
Definition at line 134 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 128 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), getStatsByEventTypes(), and getSummaryStats().
|
mutableprivate |
Definition at line 133 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), getStatsByConnection(), getStatsByEventTypes(), and getSummaryStats().
|
private |
Definition at line 106 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), and getSummaryStats().
|
private |
Definition at line 125 of file DataRetrieverMonitorCollection.h.
Referenced by smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::insert().