MCPcopy Create free account
hub / github.com/ActiveState/code / parse

Method parse

recipes/Python/578138_gprof2dotpy/recipe-578138.py:1411–1427  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1409 break
1410
1411 def parse(self):
1412 # read lookahead
1413 self.readline()
1414
1415 profile = self.profile
1416 profile[SAMPLES] = 0
1417 while not self.eof():
1418 self.parse_event()
1419
1420 # compute derived data
1421 profile.validate()
1422 profile.find_cycles()
1423 profile.ratio(TIME_RATIO, SAMPLES)
1424 profile.call_ratios(SAMPLES2)
1425 profile.integrate(TOTAL_TIME_RATIO, TIME_RATIO)
1426
1427 return profile
1428
1429 def parse_event(self):
1430 if self.eof():

Callers

nothing calls this directly

Calls 8

readlineMethod · 0.95
parse_eventMethod · 0.95
find_cyclesMethod · 0.80
ratioMethod · 0.80
call_ratiosMethod · 0.80
eofMethod · 0.45
validateMethod · 0.45
integrateMethod · 0.45

Tested by

no test coverage detected