(self)
| 1099 | self.profile[SAMPLES] = 0 |
| 1100 | |
| 1101 | def parse(self): |
| 1102 | # read lookahead |
| 1103 | self.readline() |
| 1104 | |
| 1105 | self.parse_key('version') |
| 1106 | self.parse_key('creator') |
| 1107 | while self.parse_part(): |
| 1108 | pass |
| 1109 | if not self.eof(): |
| 1110 | sys.stderr.write('warning: line %u: unexpected line\n' % self.line_no) |
| 1111 | sys.stderr.write('%s\n' % self.lookahead()) |
| 1112 | |
| 1113 | # compute derived data |
| 1114 | self.profile.validate() |
| 1115 | self.profile.find_cycles() |
| 1116 | self.profile.ratio(TIME_RATIO, SAMPLES) |
| 1117 | self.profile.call_ratios(CALLS) |
| 1118 | self.profile.integrate(TOTAL_TIME_RATIO, TIME_RATIO) |
| 1119 | |
| 1120 | return self.profile |
| 1121 | |
| 1122 | def parse_part(self): |
| 1123 | if not self.parse_header_line(): |
nothing calls this directly
no test coverage detected