File: garbage.py

package info (click to toggle)
pympler 0.9%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,172 kB
  • sloc: python: 9,943; javascript: 2,775; makefile: 21
file content (25 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

from pympler.garbagegraph import start_debug_garbage
from pympler import web


class Leaf(object):
    pass


class Branch(object):
    def __init__(self, root):
        self.root = root
        self.leaf = Leaf()


class Root(object):
    def __init__(self, num_branches):
        self.branches = [Branch(self) for _ in range(num_branches)]


start_debug_garbage()

tree = Root(2)
del tree
web.start_profiler(debug=True)