Return run total value.
771370
def profile_validation(self, status):
        """"""
        self.selected_profile.data.setdefault('validation_pass_count', 0)
        self.selected_profile.data.setdefault('validation_fail_count', 0)
        if status:
            self.selected_profile.data['validation_pass_count'] += 1
        else:
            self.selected_profile.data['validation_fail_count'] += 1
877468
def calculate_totals( self, children, local_children=None ):
        """"""
        for field,local_field in (('recursive','calls'),('cumulative','local')):
            values = []
            for child in children:
                if isinstance( child, PStatGroup ) or not self.LOCAL_ONLY:
                    values.append( getattr( child, field, 0 ) )
                elif isinstance( child, PStatRow ) and self.LOCAL_ONLY:
                    values.append( getattr( child, local_field, 0 ) )
            value = sum( values )
            setattr( self, field, value )
        if self.recursive:
            self.cumulativePer = self.cumulative/float(self.recursive)
        else:
            self.recursive = 0
        if local_children:
            for field in ('local','calls'):
                value = sum([ getattr( child, field, 0 ) for child in children] )
                setattr( self, field, value )
            if self.calls:
                self.localPer = self.local / self.calls
        else:
            self.local = 0
            self.calls = 0
            self.localPer = 0
502919
def runtime(self):
        """"""
        if self._start_time is None:
            return self._run_time
        else:
            return self._run_time + (time.time() - self._start_time)
59686
def get_runtime(self):
        """"""
        if self.start is None: return None

        if self.end is None:
            delta = datetime.datetime.now() - self.start
        else:
            delta = self.end - self.start

        return MyTimedelta.as_timedelta(delta)
609365
function calculateStatsPerRun(results) {
    return results.reduce((stat, result) => {
        stat.errorCount += result.errorCount;
        stat.warningCount += result.warningCount;
        stat.fixableErrorCount += result.fixableErrorCount;
        stat.fixableWarningCount += result.fixableWarningCount;
        return stat;
    }, {
        errorCount: 0,
        warningCount: 0,
        fixableErrorCount: 0,
        fixableWarningCount: 0
    });
}
1244053
def get_total_result_count(self):
        """"""

        doc = self._request(self._ws_prefix + ".search", True)

        return _extract(doc, "totalResults")
1271452
def elapsed(self):
        

        # Clock stops running when total is reached
        if self.count == self.total:
            elapsed = self.last_update - self.start
        else:
            elapsed = time.time() - self.start

        return elapsed
268733
public T getTotal() {
        Lock lock = this.lock.readLock();
        lock.lock();
        try {
            return this.total;
        } finally {
            lock.unlock();
        }
    }
1188181
def get_income_total(self) -> Decimal:
        
        accounts = self.get_income_accounts()
        # log(DEBUG, "income accounts: %s", accounts)
        income = Decimal(0)
        for acct in accounts:
            income += acct.get_balance()
        return income
832780
def get_total_paid_for_remaining_stock(self) -> Decimal:
        
        paid = Decimal(0)

        accounts = self.get_holding_accounts()
        for acc in accounts:
            splits = self.get_available_splits_for_account(acc)
            paid += sum(split.value for split in splits)
        return paid
1341378
def totals(iter, keyfunc, sumfunc):
    
    data = sorted(iter, key=keyfunc)
    res = {}

    for k, group in groupby(data, keyfunc):
        res[k] = sum([sumfunc(entry) for entry in group])

    return res
1360893
def result(self):
    """"""
    return {
      "count": self._count,
      "total": self._total,
      "average": float(self._total) / self._count if self._count else 0
    }
1048280
public function total()
    {
        $total = 0;
        foreach ($this->_logs as $key => $value) {
            $total += count($value);
        }
        return $total;
    }
465947
def determine_run_number(self) -> int:
        
        run_number = 0
        run_number_file = self.data_path.joinpath('run_number.txt')
        if run_number_file.exists():
            run_number = int(run_number_file.read_text()) + 1
        run_number_file.write_text(str(run_number))
        log.info('Run number', run_number=run_number)
        return run_number
948156
def elapsed(self):
        """"""
        if not self.started or self._start_time is None:
            return 0.0
        return self._timing_data[-1][0] - self._start_time
656749
def get(self):
        """"""
        elapsed = datetime.now() - self._previous
        self._previous += elapsed
        return elapsed.total_seconds()
122757
def _get_total_read_size(self):
        """"""
        if self.read_size:
            read_size = EVENT_SIZE * self.read_size
        else:
            read_size = EVENT_SIZE
        return read_size