File: PrintProfile.py

package info (click to toggle)
aap 1.072-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 4,976 kB
  • ctags: 2,160
  • sloc: python: 15,113; makefile: 62; sh: 13
file content (23 lines) | stat: -rwxr-xr-x 599 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
#! /usr/bin/env python
# Part of the A-A-P recipe executive: Print a profile

# Copyright (C) 2002-2003 Stichting NLnet Labs
# Permission to copy and use this file is specified in the file COPYING.
# If this file is missing you can find it here: http://www.a-a-p.org/COPYING

import sys
import pstats

if __name__ == '__main__':
    p = pstats.Stats(sys.argv[1])
    p.sort_stats('time')
    p.print_stats()
    p.sort_stats('cumulative')
    p.print_stats()
    p.sort_stats('time')
    p.print_callers()
    p.sort_stats('cumulative')
    p.print_callees()


# vim: set sw=4 et sts=4 tw=79 fo+=l: