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

def CallProfiler::profiler::Transaction::startCall (   self,
  meta_type,
  object,
  time_start = None 
)

Register a call

Definition at line 186 of file profiler.py.

00186                                                            :
        '''Register a call
        '''
        if time_start is None:
            time_start = time.time()
        parent = self.stack[-1]

        # insert a processing event
        if parent['events']:
            # get the time of the end of the previous call
            previous = parent['events'][-1]['time_end']
        else:
            # or the start of the current call
            previous = parent['time_start']
        info = {'time_total': time_start - previous}
        parent['events'].append(info)

        # now insert the call
        info = {'meta_type': meta_type, 'object': object,
            'time_start': time_start,
            'time_elapsed': time_start - self.time_start, 'events': []}
        parent['events'].append(info)
        self.stack.append(info)

    def endCall(self, time_end=None):


Generated by  Doxygen 1.6.0   Back to index