summaryrefslogtreecommitdiffstats
path: root/venv/lib/python3.9/site-packages/pympler/templates/process.tpl
blob: 3f5d54ff63b553d0938e45c51e8f4e8e6b26b698 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
%include('header', category='Process', title='Process Information')
%from pympler.util.stringutils import pp

<h1>Process information</h1>

<table class="tdata">
    <tbody>
    <tr>
        <th>Virtual size:</th>
        <td class="num">{{pp(info.vsz)}}</td>
    </tr>
    <tr>
        <th>Physical memory size:</th>
        <td class="num">{{pp(info.rss)}}</td>
    </tr>
    <tr>
        <th>Major pagefaults:</th>
        <td class="num">{{info.pagefaults}}</td>
    </tr>
    %for key, value in info.os_specific:
        <tr>
            <th>{{key}}:</th>
            <td class="num">{{value}}</td>
        </tr>
    %end
    </tbody>
</table>

<h2>Thread information</h2>

<table class="tdata">
    <tbody>
    <tr>
        <th>ID</th>
        <th>Name</th>
        <th>Daemon</th>
    </tr>
    %for tinfo in threads:
        <tr>
            <td>{{tinfo.ident}}</td>
            <td>{{tinfo.name}}</td>
            <td>{{tinfo.daemon}}</td>
        </tr>
    %end
    </tbody>
</table>

<h2>Thread stacks</h2>

<div class="stacks">
    %for tinfo in threads:
        <div class="stacktrace" id="{{tinfo.ident}}">
            <a class="show_traceback" href="#">Traceback for thread {{tinfo.name}}</a>
        </div>
    %end
</div>

<script type="text/javascript">
    $(".show_traceback").click(function() {
        var tid = $(this).parent().attr("id");
        $.get("/traceback/"+tid, function(data) {
            $("#"+tid).replaceWith(data);
        });
        return false;
    });
    $(".stacks").delegate(".expand_local", "click", function() {
        var oid = $(this).attr("id");
        $.get("/objects/"+oid, function(data) {
            $("#"+oid).replaceWith(data);
        });
        return false;
    });
    $(".stacks").delegate(".expand_ref", "click", function() {
        var node_id = $(this).attr("id");
        var oid = node_id.split("_")[0];
        $.get("/objects/"+oid, function(data) {
            $("#children_"+node_id).append(data);
        });
        $(this).removeClass("expand_ref").addClass("toggle_ref");
        return false;
    });
    $(".stacks").delegate(".toggle_ref", "click", function() {
        var node_id = $(this).attr("id");
        $("#children_"+node_id).toggle();
        return false;
    });
</script>

%include('footer')