9 if(gettimeofday(&t,0)<0)
10 throw cms::Exception(
"SysCallFailed",
"Failed call to gettimeofday");
12 return (
double)t.tv_sec + (double(t.tv_usec) * 1E-6);
60 (*it).second.ncalls_++;
61 (*it).second.total_ +=
t;
62 (*it).second.max_ = ((*it).second.max_ >
t) ? (*it).second.max_ : t;
67 std::map<std::string, times>::const_iterator it =
profiles_.find(name);
71 return (*it).second.firstEvent_;
76 std::map<std::string, times>::const_iterator it =
profiles_.find(name);
80 return (*it).second.max_;
85 std::map<std::string, times>::const_iterator it =
profiles_.find(name);
89 return (*it).second.total_/(*it).second.ncalls_;
double getAve(std::string const &name) const
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void watchPostModule(PostModule::slot_type const &iSlot)
void watchPreProcessEvent(PreProcessEvent::slot_type const &iSlot)
TimeProfilerService(const edm::ParameterSet &, edm::ActivityRegistry &)
std::string const & moduleLabel() const
double getFirst(std::string const &name) const
void watchPreModule(PreModule::slot_type const &iSlot)
void postEventProcessing(const edm::Event &, const edm::EventSetup &)
void watchPostProcessEvent(PostProcessEvent::slot_type const &iSlot)
double getMax(std::string const &name) const
void preEventProcessing(const edm::EventID &, const edm::Timestamp &)
void postModule(const edm::ModuleDescription &)
std::map< std::string, times > profiles_
void preModule(const edm::ModuleDescription &)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal