def record(self, duration):
self.agent.log('Activating block profiler.')
signal.setitimer(signal.ITIMER_REAL, self.SAMPLING_RATE, self.SAMPLING_RATE)
time.sleep(duration)
signal.setitimer(signal.ITIMER_REAL, 0)
self.agent.log('Deactivating block profiler.')
self.profile_duration += duration
self.agent.log('Block profiler CPU overhead per activity second: {0} seconds'.format(self.profile._overhead / self.profile_duration))
评论列表
文章目录