prefix_ void senf::Collector::enter(float min, float avg, float max)
{
accAvg_ += avg;
- if (avg < accMin_) accMin_ = avg;
- if (avg > accMax_) accMax_ = avg;
+ if (min < accMin_) accMin_ = min;
+ if (max > accMax_) accMax_ = max;
if (++i_ >= rank_) {
- if( i_ == 1){
- // no averaging, report min & max for this period
- StatisticsBase::enter(min, avg, max);
- }
- else{
- // averaging, report min(avgs) and max(avgs)
- StatisticsBase::enter(accMin_, accAvg_ / rank_, accMax_);
- }
+ StatisticsBase::enter(accMin_, accAvg_ / i_, accMax_);
i_ = 0;
accMin_ = FLT_MAX;
accAvg_ = 0.0f;
cdir = os.path.normpath(cdir)
if cdir.startswith('../'):
SCons.Util.display("scons: WARNING: failed to undo -C option")
- elif cdir != '.':
+ elif cdir != '.' and not cdir.startswith('/'):
os.chdir('/'.join(('..' for _ in cdir.split('/'))))
os.environ['SCONS_LIB_DIR'] = sconsengine
os.execv(sconsscript, sys.argv)