| 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""" |