• Home
  • Raw
  • Download

Lines Matching refs:self

36   def __init__(self, name):  argument
37 self.name = name
38 self.children = []
40 def add_child(self, child): argument
41 self.children.append(child)
43 def __str__(self): argument
44 return 'CallTreeNode:\n' + '\n'.join(self._dump(1))
46 def _dump(self, indent): argument
48 strs = [indent_str + self.name]
49 for child in self.children:
56 def __init__(self, name, comm, overhead, children_overhead): argument
57 self.name = name
58 self.comm = comm
59 self.overhead = overhead
62 self.children_overhead = children_overhead
63 self.call_tree = None
65 def set_call_tree(self, call_tree): argument
66 self.call_tree = call_tree
68 def __str__(self): argument
71 self.name, self.comm, self.overhead, self.children_overhead))
72 if self.call_tree:
73 strs.append('\t%s' % self.call_tree)
79 def __init__(self, symbol_name=None, comm=None, min_overhead=None, argument
81 self.symbol_name = symbol_name
82 self.comm = comm
83 self.min_overhead = min_overhead
84 self.max_overhead = max_overhead
86 def __str__(self): argument
89 if self.symbol_name is not None:
90 strs.append('symbol_name=%s' % self.symbol_name)
91 if self.comm is not None:
92 strs.append('comm=%s' % self.comm)
93 if self.min_overhead is not None:
94 strs.append('min_overhead=%f' % self.min_overhead)
95 if self.max_overhead is not None:
96 strs.append('max_overhead=%f' % self.max_overhead)
99 def is_match(self, symbol): argument
100 if self.symbol_name is not None:
101 if self.symbol_name != symbol.name:
103 if self.comm is not None:
104 if self.comm != symbol.comm:
108 def check_overhead(self, overhead): argument
109 if self.min_overhead is not None:
110 if self.min_overhead > overhead:
112 if self.max_overhead is not None:
113 if self.max_overhead < overhead:
120 def __init__(self, symbol_name, comm=None): argument
121 self.symbol_name = symbol_name
122 self.comm = comm
123 self.children = []
125 def add_child(self, child): argument
126 self.children.append(child)
128 def __str__(self): argument
129 return 'SymbolRelationRequirement:\n' + '\n'.join(self._dump(1))
131 def _dump(self, indent): argument
133 strs = [indent_str + self.symbol_name +
134 (' ' + self.comm if self.comm else '')]
135 for child in self.children:
139 def is_match(self, symbol): argument
140 if symbol.name != self.symbol_name:
142 if self.comm is not None:
143 if symbol.comm != self.comm:
147 def check_relation(self, call_tree): argument
150 if self.symbol_name != call_tree.name:
152 for child in self.children:
166 self, argument
173 self.test_name = test_name
174 self.executable_name = executable_name
175 self.report_options = report_options
176 self.symbol_overhead_requirements = symbol_overhead_requirements
177 self.symbol_children_overhead_requirements = (
179 self.symbol_relation_requirements = symbol_relation_requirements
181 def __str__(self): argument
183 strs.append('Test test_name=%s' % self.test_name)
184 strs.append('\texecutable_name=%s' % self.executable_name)
185 strs.append('\treport_options=%s' % (' '.join(self.report_options)))
187 for req in self.symbol_overhead_requirements:
190 for req in self.symbol_children_overhead_requirements:
193 for req in self.symbol_relation_requirements:
278 def __init__(self, perf_path): argument
279 self.perf_path = perf_path
281 def record(self, test_executable_name, record_file, additional_options=[]): argument
282 call_args = [self.perf_path,
288 self._call(call_args)
290 def report(self, record_file, report_file, additional_options=[]): argument
291 call_args = [self.perf_path,
294 self._call(call_args, report_file)
296 def _call(self, args, output_file=None): argument
304 def _call(self, args, output_file=None): argument
317 def _call(self, args, output_file=None): argument
332 def _read_report_file(self, report_file, has_callgraph): argument
352 return self._parse_report_items(report_item_lines, has_callgraph)
354 def _parse_report_items(self, lines, has_callgraph): argument
424 def check_report_file(self, test, report_file, has_callgraph): argument
425 symbols = self._read_report_file(report_file, has_callgraph)
426 if not self._check_symbol_overhead_requirements(test, symbols):
429 if not self._check_symbol_children_overhead_requirements(test, symbols):
431 if not self._check_symbol_relation_requirements(test, symbols):
435 def _check_symbol_overhead_requirements(self, test, symbols): argument
458 def _check_symbol_children_overhead_requirements(self, test, symbols): argument
478 def _check_symbol_relation_requirements(self, test, symbols): argument