|
|
Go to the documentation of this file.
37 std::map<std::string, std::string> props;
39 stats->recomputeProperties(props);
45 std::vector<std::pair<std::string, XrdStatisticsService::CondorIOStats>>
result;
58 cs.bytesRead =
ss->getTotalBytes();
59 cs.transferTime =
ss->getTotalReadTime();
68 if (
stats->site() == site) {
80 if (
m_instance.compare_exchange_strong(expected,
tmp.get())) {
87 return m_instance.load(std::memory_order_relaxed);
92 desc.
setComment(
"Report Xrootd-related statistics centrally.");
95 "True: Add per-site Xrootd statistics to the framework job report.\n"
96 "False: Collect no site-specific statistics.\n");
97 descriptions.
add(
"XrdAdaptor::XrdStatisticsService", desc);
111 std::shared_ptr<ClientRequest> req) {
117 std::ostringstream formatter;
119 return formatter.str();
123 std::ostringstream formatter;
124 formatter << std::setw(4) <<
input;
125 return formatter.str();
133 props[
"readv-totalMegabytes"] =
d2str(static_cast<float>(
m_readvSize) / (1024.0 * 1024.0));
137 props[
"read-totalMegabytes"] =
d2str(static_cast<float>(
m_readSize) / (1024.0 * 1024.0));
138 props[
"read-totalMsecs"] =
d2str(static_cast<float>(
m_readNS) / 1e6);
155 : m_size(
size), m_count(
count), m_parent(
parent), m_start(
std::chrono::high_resolution_clock::
now()) {}
159 return std::chrono::duration_cast<std::chrono::nanoseconds>(
end -
m_start).count();
static std::string d2str(double input)
static const std::string input
unique_ptr< ClusterSequence > cs
void finishRead(XrdReadStatistics const &)
XrdSiteStatistics(std::string const &site)
std::atomic< uint64_t > m_readvNS
std::atomic< unsigned > m_chunkCount
T getUntrackedParameter(std::string const &, T const &) const
XrdStatisticsService(const edm::ParameterSet &iPS, edm::ActivityRegistry &iRegistry)
std::atomic< unsigned > m_readvCount
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static std::shared_ptr< XrdReadStatistics > startRead(std::shared_ptr< XrdSiteStatistics > parent, std::shared_ptr< ClientRequest > req)
friend class XrdReadStatistics
std::atomic< uint64_t > m_readNS
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void setComment(std::string const &value)
XrdReadStatistics(const XrdReadStatistics &)=delete
void recomputeProperties(std::map< std::string, std::string > &props)
static std::string i2str(int input)
static PFTauRenderPlugin instance
std::atomic< uint64_t > m_readSize
uint64_t elapsedNS() const
std::vector< std::pair< std::string, CondorIOStats > > condorUpdate()
unsigned long long uint64_t
void reportPerformanceForModule(std::string const &metricClass, std::string const &moduleName, std::map< std::string, std::string > const &metrics)
std::atomic< unsigned > m_readCount
std::atomic< uint64_t > m_readvSize
std::chrono::time_point< std::chrono::high_resolution_clock > m_start
void fillDescriptions(edm::ConfigurationDescriptions &descriptions)