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

Method aggregate

recipes/Python/578138_gprof2dotpy/recipe-578138.py:499–508  ·  view source on GitHub ↗

Aggregate an event for the whole profile.

(self, event)

Source from the content-addressed store, hash-verified

497 return partials[function]
498
499 def aggregate(self, event):
500 """Aggregate an event for the whole profile."""
501
502 total = event.null()
503 for function in self.functions.values():
504 try:
505 total = event.aggregate(total, function[event])
506 except UndefinedEvent:
507 return
508 self[event] = total
509
510 def ratio(self, outevent, inevent):
511 assert outevent not in self

Callers

nothing calls this directly

Calls 3

nullMethod · 0.80
valuesMethod · 0.45
aggregateMethod · 0.45

Tested by

no test coverage detected