• Home
  • Raw
  • Download

Lines Matching refs:period

88     def __init__(self, period=0, acc_period=0):  argument
89 self.period = period
94 self.period += other.period
103 self.period = Period()
106 def add_period(self, period): argument
107 self.period += period
114 self.period = Period()
121 def add_period(self, period): argument
122 self.period += period
125 def add_line_period(self, line, period): argument
129 a += period
132 def add_function_period(self, function_name, function_start_line, period): argument
138 a[1] += period
180 self.period = 0
285 period = Period(sample.period, sample.period)
288 period = Period(0, sample.period)
293 self._add_dso_period(symbol.dso_name, period, used_dso_dict)
298 self._add_file_period(source, period, used_file_dict)
301 self._add_line_period(source, period, used_line_dict)
306 self._add_file_period(source, period, used_file_dict)
308 self._add_function_period(source, period, used_function_dict)
311 self.period += sample.period
314 def _add_dso_period(self, dso_name, period, used_dso_dict): argument
320 dso_period.add_period(period)
323 def _add_file_period(self, source, period, used_file_dict): argument
329 file_period.add_period(period)
332 def _add_line_period(self, source, period, used_line_dict): argument
336 file_period.add_line_period(source.line, period)
339 def _add_function_period(self, source, period, used_function_dict): argument
343 file_period.add_function_period(source.function, source.line, period)
349 f.write('total period: %d\n\n' % self.period)
351 key=lambda x: x.period.acc_period, reverse=True)
354 self._get_percentage_str(dso_period.period)))
358 key=lambda x: x.period.acc_period, reverse=True)
361 self._get_percentage_str(file_period.period)))
364 self._get_percentage_str(file_period.period)))
367 func_start_line, period = file_period.function_dict[func_name]
368 values.append((func_name, func_start_line, period))
379 def _get_percentage_str(self, period, short=False): argument
381 return s % self._get_percentage(period)
384 def _get_percentage(self, period): argument
385 if self.period == 0:
387 acc_p = 100.0 * period.acc_period / self.period
388 p = 100.0 * period.period / self.period
430 func_start_line, period = file_period.function_dict[func_name]
434 annotates[line] = '[func] ' + self._get_percentage_str(period, True)
435 annotates[1] = '[file] ' + self._get_percentage_str(file_period.period, True)