CMS 3D CMS Logo

List of all members | Classes | Public Member Functions
XrdAdaptor::XrdStatisticsService Class Reference

#include <XrdStatistics.h>

Classes

struct  CondorIOStats
 

Public Member Functions

std::vector< std::pair< std::string, CondorIOStats > > condorUpdate ()
 
void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
void postEndJob ()
 
 XrdStatisticsService (const edm::ParameterSet &iPS, edm::ActivityRegistry &iRegistry)
 

Detailed Description

Definition at line 35 of file XrdStatistics.h.

Constructor & Destructor Documentation

◆ XrdStatisticsService()

XrdStatisticsService::XrdStatisticsService ( const edm::ParameterSet iPS,
edm::ActivityRegistry iRegistry 
)

Member Function Documentation

◆ condorUpdate()

std::vector< std::pair< std::string, XrdStatisticsService::CondorIOStats > > XrdStatisticsService::condorUpdate ( )

Definition at line 44 of file XrdStatistics.cc.

44  {
45  std::vector<std::pair<std::string, XrdStatisticsService::CondorIOStats>> result;
47  if (!instance) {
48  return result;
49  }
50 
51  std::lock_guard<std::mutex> lock(instance->m_mutex);
52  result.reserve(instance->m_sites.size());
53  for (auto &stats : instance->m_sites) {
54  CondorIOStats cs;
55  std::shared_ptr<XrdSiteStatistics> ss = get_underlying_safe(stats);
56  if (!ss)
57  continue;
58  cs.bytesRead = ss->getTotalBytes();
59  cs.transferTime = ss->getTotalReadTime();
60  result.emplace_back(ss->site(), cs);
61  }
62  return result;
63 }

References fwrapper::cs, edm::get_underlying_safe(), XrdAdaptor::XrdSiteStatisticsInformation::getInstance(), instance, CommonMethods::lock(), mps_fire::result, contentValuesCheck::ss, and dqmMemoryStats::stats.

Referenced by edm::service::CondorStatusService::updateImpl().

◆ fillDescriptions()

void XrdStatisticsService::fillDescriptions ( edm::ConfigurationDescriptions descriptions)

Definition at line 90 of file XrdStatistics.cc.

90  {
92  desc.setComment("Report Xrootd-related statistics centrally.");
93  desc.addUntracked<bool>("reportToFJR", true)
94  ->setComment(
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);
98 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), and edm::ParameterSetDescription::setComment().

◆ postEndJob()

void XrdStatisticsService::postEndJob ( )

Definition at line 26 of file XrdStatistics.cc.

26  {
28  if (!reportSvc.isAvailable()) {
29  return;
30  }
31 
33  if (!instance) {
34  return;
35  }
36 
37  std::map<std::string, std::string> props;
38  for (auto &stats : instance->m_sites) {
39  stats->recomputeProperties(props);
40  reportSvc->reportPerformanceForModule(stats->site(), "XrdSiteStatistics", props);
41  }
42 }

References XrdAdaptor::XrdSiteStatisticsInformation::getInstance(), instance, edm::Service< T >::isAvailable(), edm::JobReport::reportPerformanceForModule(), and dqmMemoryStats::stats.

Referenced by XrdStatisticsService().

XrdAdaptor::XrdSiteStatisticsInformation
Definition: XrdStatistics.h:55
XrdAdaptor::XrdSiteStatisticsInformation::getInstance
static XrdSiteStatisticsInformation * getInstance()
Definition: XrdStatistics.cc:86
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:45
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
edm::ActivityRegistry::watchPostEndJob
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:168
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
XrdAdaptor::XrdStatisticsService::postEndJob
void postEndJob()
Definition: XrdStatistics.cc:26
edm::get_underlying_safe
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:40
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
edm::ParameterSetDescription::setComment
void setComment(std::string const &value)
Definition: ParameterSetDescription.cc:33
CommonMethods.lock
def lock()
Definition: CommonMethods.py:82
edm::Service
Definition: Service.h:30
dqmMemoryStats.stats
stats
Definition: dqmMemoryStats.py:134
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
XrdAdaptor::XrdSiteStatisticsInformation::createInstance
static void createInstance()
Definition: XrdStatistics.cc:76
mps_fire.result
result
Definition: mps_fire.py:303
edm::JobReport::reportPerformanceForModule
void reportPerformanceForModule(std::string const &metricClass, std::string const &moduleName, std::map< std::string, std::string > const &metrics)
Definition: JobReport.cc:672