Public Member Functions | |
void | calcStat () |
void | deleteModuleSamplingPtr () |
float | getEvtTime () |
float | getEvtTimeErr () |
float | getFracBusy () |
float | getFracCPUBusy () |
std::pair< unsigned int, unsigned int > * | getModuleSamplingPtr () |
unsigned int | getNSampledNonIdle () |
std::vector< std::pair < unsigned int, unsigned int > > | getOffendersVector () |
float | getRate () |
float | getRateErr () |
float | getRateErrPerMachine () |
float | getRatePerMachine () |
unsigned int | getReports () |
lsStat (unsigned int ls, unsigned int nbSubs, unsigned int maxreps, unsigned int nmodulenames) | |
void | update (unsigned int nSampledNonIdle, unsigned int nSampledIdle, unsigned int nProc, unsigned int ncpubusy) |
Public Attributes | |
double | evtTimeAvg |
double | evtTimeErr |
double | fracCPUBusy_ |
double | fracWaitingAvg |
unsigned int | ls_ |
std::pair< unsigned int, unsigned int > * | moduleSamplingSums |
unsigned int | nbSubs_ |
unsigned int | nCPUBusy_ |
unsigned int | nMaxReports_ |
unsigned int | nmodulenames_ |
unsigned int | nProc2_ |
unsigned int | nProc_ |
unsigned int | nReports_ |
unsigned int | nSampledIdle2_ |
unsigned int | nSampledIdle_ |
unsigned int | nSampledNonIdle2_ |
unsigned int | nSampledNonIdle_ |
double | rateAvg |
double | rateErr |
bool | updated_ |
evf::iDie::lsStat::lsStat | ( | unsigned int | ls, |
unsigned int | nbSubs, | ||
unsigned int | maxreps, | ||
unsigned int | nmodulenames | ||
) | [inline] |
Definition at line 328 of file iDie.h.
References i, moduleSamplingSums, and nmodulenames_.
: ls_(ls),updated_(false),nbSubs_(nbSubs), nSampledNonIdle_(0),nSampledNonIdle2_(0),nSampledIdle_(0),nSampledIdle2_(0), nProc_(0),nProc2_(0),nCPUBusy_(0),nReports_(0),nMaxReports_(maxreps),nmodulenames_(nmodulenames) { moduleSamplingSums = new std::pair<unsigned int,unsigned int>[nmodulenames_]; for (unsigned int i=0;i<nmodulenames_;i++) { moduleSamplingSums[i].first=i; moduleSamplingSums[i].second=0; } }
void evf::iDie::lsStat::calcStat | ( | ) | [inline] |
Definition at line 362 of file iDie.h.
References evtTimeAvg, evtTimeErr, fracCPUBusy_, fracWaitingAvg, nbSubs_, nCPUBusy_, nProc2_, nProc_, nReports_, nSampledIdle2_, nSampledIdle_, nSampledNonIdle2_, nSampledNonIdle_, funct::pow(), rateAvg, rateErr, mathSSE::sqrt(), and updated_.
Referenced by getEvtTime(), getEvtTimeErr(), getFracBusy(), getFracCPUBusy(), getNSampledNonIdle(), getOffendersVector(), getRate(), getRateErr(), getRateErrPerMachine(), and getRatePerMachine().
{ if (!updated_) return; rateAvg=nProc_ / 23.; rateErr=sqrt(fabs(nProc2_ - pow(nProc_,2)))/23.; if (rateAvg==0.) {rateErr=0.;evtTimeAvg=0.;evtTimeErr=0.;fracWaitingAvg=0;} else { if (nSampledNonIdle_+nSampledIdle_!=0) { float nAllInv = 1./(nSampledNonIdle_+nSampledIdle_); fracWaitingAvg= nSampledIdle_*nAllInv; double nSampledIdleErr2=fabs(nSampledIdle2_ - pow(nSampledIdle_,2)); double nSampledNonIdleErr2=fabs(nSampledNonIdle2_ - pow(nSampledNonIdle_,2)); double fracWaitingAvgErr= sqrt( (pow(nSampledIdle_,2)*nSampledNonIdleErr2 + pow(nSampledNonIdle_,2)*nSampledIdleErr2))*pow(nAllInv,2); if (rateAvg) { float rateAvgInv=1./rateAvg; evtTimeAvg=nbSubs_ * nReports_ * (1.-fracWaitingAvg)*rateAvgInv; evtTimeErr = nbSubs_ * nReports_ * sqrt(pow(fracWaitingAvg*rateErr*pow(rateAvgInv,2),2) + pow(fracWaitingAvgErr*rateAvgInv,2)); } else { evtTimeAvg=0; evtTimeErr=0; } } } if (nReports_) fracCPUBusy_=nCPUBusy_/(nReports_*1000.); else fracCPUBusy_=0.; updated_=false; }
void evf::iDie::lsStat::deleteModuleSamplingPtr | ( | ) | [inline] |
Definition at line 356 of file iDie.h.
References moduleSamplingSums, and nmodulenames_.
{ delete moduleSamplingSums; moduleSamplingSums=nullptr; nmodulenames_=0; }
float evf::iDie::lsStat::getEvtTime | ( | ) | [inline] |
Definition at line 417 of file iDie.h.
References calcStat(), evtTimeAvg, and updated_.
Referenced by evf::iDie::fillDQMStatHist(), and evf::iDie::updateRollingHistos().
{ if (updated_) calcStat(); return evtTimeAvg; }
float evf::iDie::lsStat::getEvtTimeErr | ( | ) | [inline] |
Definition at line 422 of file iDie.h.
References calcStat(), evtTimeErr, and updated_.
Referenced by evf::iDie::fillDQMStatHist().
{ if (updated_) calcStat(); return evtTimeErr; }
float evf::iDie::lsStat::getFracBusy | ( | ) | [inline] |
Definition at line 432 of file iDie.h.
References calcStat(), fracWaitingAvg, and updated_.
Referenced by evf::iDie::updateRollingHistos().
{ if (updated_) calcStat(); return 1.-fracWaitingAvg; }
float evf::iDie::lsStat::getFracCPUBusy | ( | ) | [inline] |
Definition at line 437 of file iDie.h.
References calcStat(), fracCPUBusy_, and updated_.
Referenced by evf::iDie::updateRollingHistos().
{ if (updated_) calcStat(); return fracCPUBusy_; }
std::pair<unsigned int,unsigned int>* evf::iDie::lsStat::getModuleSamplingPtr | ( | ) | [inline] |
Definition at line 352 of file iDie.h.
References moduleSamplingSums.
{ return moduleSamplingSums; }
unsigned int evf::iDie::lsStat::getNSampledNonIdle | ( | ) | [inline] |
Definition at line 427 of file iDie.h.
References calcStat(), nSampledNonIdle_, and updated_.
Referenced by evf::iDie::parseModuleHisto().
{ if (updated_) calcStat(); return nSampledNonIdle_; }
std::vector<std::pair<unsigned int, unsigned int> > evf::iDie::lsStat::getOffendersVector | ( | ) | [inline] |
Definition at line 446 of file iDie.h.
References calcStat(), prof2calltree::count, first, MODLZSIZE, moduleSamplingSums, nmodulenames_, runTheMatrix::ret, and updated_.
Referenced by evf::iDie::parseModuleHisto().
{ std::vector<std::pair<unsigned int, unsigned int>> ret; if (updated_) calcStat(); if (moduleSamplingSums) { std::qsort((void *)moduleSamplingSums, nmodulenames_, sizeof(std::pair<unsigned int,unsigned int>), modlistSortFunction); unsigned int count=0; unsigned int saveidx=0; while (saveidx < MODLZSIZE && count<nmodulenames_ && saveidx<MODLZSIZE) { if (moduleSamplingSums[count].first==2) {count++;continue;} ret.push_back(moduleSamplingSums[count]); saveidx++; count++; } } return ret; }
float evf::iDie::lsStat::getRate | ( | ) | [inline] |
Definition at line 393 of file iDie.h.
References calcStat(), rateAvg, and updated_.
Referenced by evf::iDie::updateRollingHistos().
float evf::iDie::lsStat::getRateErr | ( | ) | [inline] |
float evf::iDie::lsStat::getRateErrPerMachine | ( | ) | [inline] |
float evf::iDie::lsStat::getRatePerMachine | ( | ) | [inline] |
unsigned int evf::iDie::lsStat::getReports | ( | ) | [inline] |
Definition at line 442 of file iDie.h.
References nReports_.
Referenced by evf::iDie::updateRollingHistos().
{ return nReports_; }
void evf::iDie::lsStat::update | ( | unsigned int | nSampledNonIdle, |
unsigned int | nSampledIdle, | ||
unsigned int | nProc, | ||
unsigned int | ncpubusy | ||
) | [inline] |
Definition at line 340 of file iDie.h.
References nCPUBusy_, nProc2_, nProc_, nReports_, nSampledIdle2_, nSampledIdle_, nSampledNonIdle2_, nSampledNonIdle_, funct::pow(), and updated_.
{ nReports_++; nSampledNonIdle_+=nSampledNonIdle; nSampledNonIdle2_+=pow(nSampledNonIdle,2); nSampledIdle_+=nSampledIdle; nSampledIdle2_+=pow(nSampledIdle,2); nProc_+=nProc; nProc2_+=pow(nProc,2); nCPUBusy_+=ncpubusy; updated_=true; }
Definition at line 321 of file iDie.h.
Referenced by calcStat(), and getEvtTime().
Definition at line 322 of file iDie.h.
Referenced by calcStat(), and getEvtTimeErr().
Definition at line 324 of file iDie.h.
Referenced by calcStat(), and getFracCPUBusy().
Definition at line 323 of file iDie.h.
Referenced by calcStat(), and getFracBusy().
unsigned int evf::iDie::lsStat::ls_ |
Definition at line 307 of file iDie.h.
Referenced by evf::iDie::fillDQMStatHist().
std::pair<unsigned int,unsigned int>* evf::iDie::lsStat::moduleSamplingSums |
Definition at line 326 of file iDie.h.
Referenced by deleteModuleSamplingPtr(), getModuleSamplingPtr(), getOffendersVector(), and lsStat().
unsigned int evf::iDie::lsStat::nbSubs_ |
Definition at line 309 of file iDie.h.
Referenced by calcStat().
unsigned int evf::iDie::lsStat::nCPUBusy_ |
Definition at line 316 of file iDie.h.
Referenced by calcStat(), and update().
unsigned int evf::iDie::lsStat::nMaxReports_ |
unsigned int evf::iDie::lsStat::nmodulenames_ |
Definition at line 325 of file iDie.h.
Referenced by deleteModuleSamplingPtr(), getOffendersVector(), and lsStat().
unsigned int evf::iDie::lsStat::nProc2_ |
Definition at line 315 of file iDie.h.
Referenced by calcStat(), and update().
unsigned int evf::iDie::lsStat::nProc_ |
Definition at line 314 of file iDie.h.
Referenced by calcStat(), and update().
unsigned int evf::iDie::lsStat::nReports_ |
Definition at line 317 of file iDie.h.
Referenced by calcStat(), getRateErrPerMachine(), getRatePerMachine(), getReports(), and update().
unsigned int evf::iDie::lsStat::nSampledIdle2_ |
Definition at line 313 of file iDie.h.
Referenced by calcStat(), and update().
unsigned int evf::iDie::lsStat::nSampledIdle_ |
Definition at line 312 of file iDie.h.
Referenced by calcStat(), and update().
unsigned int evf::iDie::lsStat::nSampledNonIdle2_ |
Definition at line 311 of file iDie.h.
Referenced by calcStat(), and update().
unsigned int evf::iDie::lsStat::nSampledNonIdle_ |
Definition at line 310 of file iDie.h.
Referenced by calcStat(), getNSampledNonIdle(), and update().
double evf::iDie::lsStat::rateAvg |
Definition at line 319 of file iDie.h.
Referenced by calcStat(), getRate(), and getRatePerMachine().
double evf::iDie::lsStat::rateErr |
Definition at line 320 of file iDie.h.
Referenced by calcStat(), getRateErr(), and getRateErrPerMachine().
Definition at line 308 of file iDie.h.
Referenced by calcStat(), getEvtTime(), getEvtTimeErr(), getFracBusy(), getFracCPUBusy(), getNSampledNonIdle(), getOffendersVector(), getRate(), getRateErr(), getRateErrPerMachine(), getRatePerMachine(), and update().