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

Method ratio

recipes/Python/578138_gprof2dotpy/recipe-578138.py:510–521  ·  view source on GitHub ↗
(self, outevent, inevent)

Source from the content-addressed store, hash-verified

508 self[event] = total
509
510 def ratio(self, outevent, inevent):
511 assert outevent not in self
512 assert inevent in self
513 for function in self.functions.values():
514 assert outevent not in function
515 assert inevent in function
516 function[outevent] = ratio(function[inevent], self[inevent])
517 for call in function.calls.values():
518 assert outevent not in call
519 if inevent in call:
520 call[outevent] = ratio(call[inevent], self[inevent])
521 self[outevent] = 1.0
522
523 def prune(self, node_thres, edge_thres):
524 """Prune the profile"""

Callers 12

parseMethod · 0.95
parseMethod · 0.95
parseMethod · 0.95
build_profileMethod · 0.95
parseMethod · 0.95
build_profileMethod · 0.95
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
_searchMethod · 0.80

Calls 2

ratioFunction · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected