equal
deleted
inserted
replaced
23 self.data = data |
23 self.data = data |
24 |
24 |
25 def sort(self, crit="inlinetime"): |
25 def sort(self, crit="inlinetime"): |
26 """XXX docstring""" |
26 """XXX docstring""" |
27 if crit not in profiler_entry.__dict__: |
27 if crit not in profiler_entry.__dict__: |
28 raise ValueError, "Can't sort by %s" % crit |
28 raise ValueError("Can't sort by %s" % crit) |
29 self.data.sort(lambda b, a: cmp(getattr(a, crit), |
29 self.data.sort(lambda b, a: cmp(getattr(a, crit), |
30 getattr(b, crit))) |
30 getattr(b, crit))) |
31 for e in self.data: |
31 for e in self.data: |
32 if e.calls: |
32 if e.calls: |
33 e.calls.sort(lambda b, a: cmp(getattr(a, crit), |
33 e.calls.sort(lambda b, a: cmp(getattr(a, crit), |