#include <DataRetrieverMonitorCollection.h>
Classes | |
struct | DataRetrieverMQ |
struct | EventMQ |
struct | EventStats |
class | EventTypeMqMap |
struct | EventTypePerConnectionStats |
struct | SummaryStats |
Public Types | |
typedef std::map< std::string, EventStats > | ConnectionStats |
enum | ConnectionStatus { CONNECTED, CONNECTION_FAILED, DISCONNECTED, UNKNOWN } |
typedef std::vector < EventTypePerConnectionStats > | EventTypePerConnectionStatList |
Public Types inherited from stor::MonitorCollection | |
typedef std::vector< std::pair < std::string, xdata::Serializable * > > | InfoSpaceItems |
Private Types | |
typedef std::map< std::string, EventMQPtr > | ConnectionMqMap |
typedef boost::shared_ptr < DataRetrieverMQ > | DataRetrieverMQPtr |
typedef boost::shared_ptr < EventMQ > | EventMQPtr |
typedef std::map< ConnectionID, DataRetrieverMQPtr > | RetrieverMqMap |
Private Member Functions | |
void | checkForCorruptedEvents () |
DataRetrieverMonitorCollection (DataRetrieverMonitorCollection const &) | |
virtual void | do_calculateStatistics () |
virtual void | do_reset () |
DataRetrieverMonitorCollection & | operator= (DataRetrieverMonitorCollection const &) |
void | sendAlarms () |
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 35 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 167 of file DataRetrieverMonitorCollection.h.
typedef std::map<std::string, EventStats> smproxy::DataRetrieverMonitorCollection::ConnectionStats |
Definition at line 58 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 163 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 138 of file DataRetrieverMonitorCollection.h.
typedef std::vector<EventTypePerConnectionStats> smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStatList |
Definition at line 68 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 164 of file DataRetrieverMonitorCollection.h.
Enumerator | |
---|---|
CONNECTED | |
CONNECTION_FAILED | |
DISCONNECTED | |
UNKNOWN |
Definition at line 39 of file DataRetrieverMonitorCollection.h.
smproxy::DataRetrieverMonitorCollection::DataRetrieverMonitorCollection | ( | const stor::utils::Duration_t & | updateInterval, |
stor::AlarmHandlerPtr | alarmHandler | ||
) |
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 30 of file DataRetrieverMonitorCollection.cc.
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 87 of file DataRetrieverMonitorCollection.cc.
References findQualityFiles::size, reco_skim_cfg_mod::sourceURL, and AlCaHLTBitMon_QueryRunRegistry::string.
|
private |
Definition at line 212 of file DataRetrieverMonitorCollection.cc.
References alarmHandler_, alarmParams_, smproxy::AlarmParams::corruptedEventRate_, smproxy::DataRetrieverMonitorCollection::EventStats::corruptedEventsStats, stor::AlarmHandler::ERROR, smproxy::DataRetrieverMonitorCollection::EventMQ::getStats(), stor::MonitoredQuantity::Stats::getValueRate(), lumiQueryAPI::msg, stor::MonitoredQuantity::RECENT, AlCaHLTBitMon_QueryRunRegistry::string, and totals_.
Referenced by sendAlarms().
void smproxy::DataRetrieverMonitorCollection::configureAlarms | ( | AlarmParams const & | alarmParams | ) |
Configure the alarm settings
Definition at line 198 of file DataRetrieverMonitorCollection.cc.
References alarmParams_.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 235 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::EventMQ::calculateStatistics(), smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::calculateStatistics(), connectionMqMap_, eventTypeMqMap_, retrieverMqMap_, sendAlarms(), statsMutex_, and totals_.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 259 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::clear(), connectionMqMap_, eventTypeMqMap_, smproxy::DataRetrieverMonitorCollection::EventMQ::reset(), retrieverMqMap_, statsMutex_, and totals_.
bool smproxy::DataRetrieverMonitorCollection::getEventTypeStatsForConnection | ( | const ConnectionID & | connectionId, |
EventTypePerConnectionStats & | stats | ||
) |
Put the event type statistics for the given consumer ID into the passed EventTypePerConnectionStats. Return false if the connection ID is not found.
Definition at line 68 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::connectionStatus, smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::eventStats, pos, and smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::regPtr.
void smproxy::DataRetrieverMonitorCollection::getStatsByConnection | ( | ConnectionStats & | cs | ) | const |
Write the data retrieval statistics for each connection into the given struct.
Definition at line 161 of file DataRetrieverMonitorCollection.cc.
References connectionMqMap_, and statsMutex_.
void smproxy::DataRetrieverMonitorCollection::getStatsByEventTypesPerConnection | ( | EventTypePerConnectionStatList & | etsl | ) | const |
Write the data retrieval statistics for each event type request into the given struct.
Definition at line 177 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::connectionStatus, smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::eventStats, smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::regPtr, and python.multivaluedict::sort().
void smproxy::DataRetrieverMonitorCollection::getSummaryStats | ( | SummaryStats & | stats | ) | const |
Write the data retrieval summary statistics into the given struct.
Definition at line 140 of file DataRetrieverMonitorCollection.cc.
References smproxy::DataRetrieverMonitorCollection::SummaryStats::activeSMs, CONNECTED, eventTypeMqMap_, smproxy::DataRetrieverMonitorCollection::SummaryStats::eventTypeStats, smproxy::DataRetrieverMonitorCollection::EventMQ::getStats(), smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::getStats(), smproxy::DataRetrieverMonitorCollection::SummaryStats::registeredSMs, retrieverMqMap_, statsMutex_, smproxy::DataRetrieverMonitorCollection::SummaryStats::totals, and totals_.
|
private |
bool smproxy::DataRetrieverMonitorCollection::receivedCorruptedEvent | ( | const ConnectionID & | connectionId | ) |
Increment number of corrupted events received from the given connection. Returns false if the ConnectionID is unknown.
Definition at line 115 of file DataRetrieverMonitorCollection.cc.
References reco_skim_cfg_mod::sourceURL, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::receivedCorruptedEvent().
|
private |
Definition at line 204 of file DataRetrieverMonitorCollection.cc.
References alarmParams_, checkForCorruptedEvents(), and smproxy::AlarmParams::sendAlarms_.
Referenced by do_calculateStatistics().
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 54 of file DataRetrieverMonitorCollection.cc.
References pos, and ntuplemaker::status.
|
private |
Definition at line 158 of file DataRetrieverMonitorCollection.h.
Referenced by checkForCorruptedEvents().
|
private |
Definition at line 160 of file DataRetrieverMonitorCollection.h.
Referenced by checkForCorruptedEvents(), configureAlarms(), and sendAlarms().
|
private |
Definition at line 168 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), and getStatsByConnection().
|
private |
Definition at line 216 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), and getSummaryStats().
|
private |
Definition at line 171 of file DataRetrieverMonitorCollection.h.
|
private |
Definition at line 165 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), and getSummaryStats().
|
mutableprivate |
Definition at line 170 of file DataRetrieverMonitorCollection.h.
Referenced by do_calculateStatistics(), do_reset(), getStatsByConnection(), and getSummaryStats().
|
private |
Definition at line 161 of file DataRetrieverMonitorCollection.h.
Referenced by checkForCorruptedEvents(), do_calculateStatistics(), do_reset(), and getSummaryStats().
|
private |
Definition at line 157 of file DataRetrieverMonitorCollection.h.
Referenced by smproxy::DataRetrieverMonitorCollection::EventTypeMqMap::insert().