Skip to content

Commit

Permalink
Merge pull request #23957 from Dr15Jones/avoidDoubleCPUcounting_9_3
Browse files Browse the repository at this point in the history
Avoid double counting CPU usage in ExternalLHEProducer [CMSSW_9_3]
  • Loading branch information
cmsbuild committed Aug 1, 2018
2 parents c03e83d + d472091 commit 1b7c2e6
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Description: [one line class summary]

#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Utilities/interface/RandomNumberGenerator.h"
#include "FWCore/Utilities/interface/TimingServiceBase.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"

Expand Down Expand Up @@ -450,13 +449,6 @@ ExternalLHEProducer::executeScript()
break;
}
} while (true);
edm::Service<edm::TimingServiceBase> ts;
if(ts.isAvailable()) {
struct rusage ru;
getrusage(RUSAGE_CHILDREN,&ru);
double time = static_cast<double>(ru.ru_stime.tv_sec) + (static_cast<double>(ru.ru_stime.tv_usec) * 1E-6);
ts->addToCPUTime(time);
}
if (rc) {
throw cms::Exception("ExternalLHEProducer") << "Child failed with exit code " << rc << ".";
}
Expand Down

0 comments on commit 1b7c2e6

Please sign in to comment.