Logo Search packages:      
Sourcecode: zope-callprofiler version File versions

def CallProfiler::CallProfiler::CallProfiler::summaryByURL (   self  ) 

Calculate some summary info

Definition at line 273 of file CallProfiler.py.

00273                           :
        '''Calculate some summary info
        '''
        l = profiler.listTransactions(sort='time_start')

        # print up the summary
        summary = {}
        for transaction in l:
            tt = transaction.time_total
            url = transaction.url
            if summary.has_key(url):
                d = summary[url]
                d['min'] = min(d['min'], tt)
                d['max'] = max(d['max'], tt)
                d['tot'] += tt
                d['num'] += 1
                d['ave'] = d['tot'] / d['num']
                d['transactions'].append((tt, transaction))
            else:
                summary[url] = {'min': tt, 'max': tt, 'tot': tt, 'num': 1,
                        'ave': tt, 'transactions': [(tt, transaction)],
                        'truncated_url': transaction.truncated_url}
        summary = summary.items()
        summary.sort()
        return summary

    security.declareProtected('View management screens', 'validTID')
    def validTID(self, tid):


Generated by  Doxygen 1.6.0   Back to index