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

def CallProfiler::CallProfiler::CallProfiler::aggregateDetailResults (   self,
  tid,
  show_all = 0 
)

Generate table row cells for the given transaction

Definition at line 363 of file CallProfiler.py.

00363                                                      :
        '''Generate table row cells for the given transaction
        '''
        agg = profiler.aggregateDetailResults(tid)

        # do the HTML extra bits
        pm = profileable_modules
        for depth, info in agg.listEvents():
            if info.has_key('events'):
                info['treepart'] = '| '*depth + '+-'
                if info['events'] and info.has_key('ave_time_processing'):
                    min_percent = info['min_percentage_processing']
                    percent = info['ave_percentage_processing']
                    max_percent = info['max_percentage_processing']
                    min_time_display = info['min_time_processing']
                    time_display = info['ave_time_processing']
                    max_time_display = info['max_time_processing']
                else:
                    min_percent = info['min_percentage']
                    percent = info['ave_percentage']
                    max_percent = info['max_percentage']
                    min_time_display = info['min_time_total']
                    time_display = info['ave_time_total']
                    max_time_display = info['max_time_total']
            else:
                info['treepart'] = '| '*depth
                min_percent = info['min_percentage']
                percent = info['ave_percentage']
                max_percent = info['max_percentage']
                min_time_display = info['min_time_total']
                time_display = info['ave_time_total']
                max_time_display = info['max_time_total']

            info['min_time_display'] = min_time_display
            info['time_display'] = time_display
            info['max_time_display'] = max_time_display
            info['min_percentage_display'] = min_percent
            info['percentage_display'] = percent
            info['max_percentage_display'] = max_percent

            info['icon'] = ''
            if info.has_key('meta_type'):
                module = pm[info['meta_type']]
                if module.icon:
                    info['icon'] = module.icon

            info['percentage_int'] = int(percent/2)
            if percent > 10: info['colour'] = '#ffbbbb'
            elif percent > 5: info['colour'] = '#ffdbb9'
            elif percent > 3: info['colour'] = '#fff9b9'
            else: info['colour'] = ''

        return agg

InitializeClass(CallProfiler)
modulesecurity.apply(globals())


#
# $Log: CallProfiler.py,v $
# Revision 1.12  2002/02/08 04:57:22  rjones
# typo
#
# Revision 1.11  2002/02/08 03:18:55  rjones
# got meta_type images in there... much nicer
#
# Revision 1.10  2002/02/07 23:12:48  rjones
# Fixes to the data gathering and display
#
# Revision 1.9  2002/02/07 05:09:11  rjones
# Better call stack handling
#
# Revision 1.8  2002/02/06 00:33:55  rjones
# Lots of data handling improvements:
#   . moved the data handling part off into a separate module
#   . that module has some basic unit tests
#
# Revision 1.7  2002/02/05 22:11:02  rjones
# Fixes
#
# Revision 1.6  2002/02/05 04:50:13  rjones
# Fixes, aggregation, oh my! :)
#
# Revision 1.5  2002/02/01 05:42:17  rjones
# fixes
#
# Revision 1.4  2002/01/31 23:11:36  rjones
# copyright and CVS comment cleanups
#
# Revision 1.3  2002/01/31 06:19:17  rjones
# Now adds itself to the Control Panel, and isn't available for adding elsewhere.
#
# Revision 1.2  2002/01/31 05:03:27  rjones
# adding CallProfiler to HEAD
#
# Revision 1.1.2.6  2002/01/31 04:16:33  rjones
# Some more cleanups
#
# Revision 1.1.2.5  2002/01/31 04:09:42  rjones
# More cleanups in the profiler code so we can get at the data more easily
#
# Revision 1.1.2.4  2002/01/31 00:50:08  rjones
# Profiler now patches the Zope modules as required:
#  . ZPublisher/Publish.py publish function
#  . others as defined in the profileable_modules dict in CallProfiler.py
#
# Revision 1.1.2.3  2002/01/30 07:36:00  rjones
# split off the processing code from the display code - should be easy enough
# to do the render in ZPT or *shudder* DTML.
#
# Revision 1.1.2.2  2002/01/30 05:41:33  rjones
# cosmetic changes
#
# Revision 1.1.2.1  2002/01/30 04:48:38  rjones
# CallProfiler initial version
#
#


Generated by  Doxygen 1.6.0   Back to index