File: Profiler.py

package info (click to toggle)
jokosher 0.11.5-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,456 kB
  • ctags: 1,383
  • sloc: python: 11,036; xml: 1,576; sh: 9; makefile: 7
file content (25 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/python

#
#    THIS FILE IS PART OF THE JOKOSHER PROJECT AND LICENSED UNDER THE GPL. SEE
#    THE 'COPYING' FILE FOR DETAILS
#
#    This module is meant for testing and profiling the code only.
#    This file should not be included in any release.
#
#-------------------------------------------------------------------------------

import hotshot
from hotshot import stats

import JokosherApp

profile = hotshot.Profile("JokosherApp", lineevents=1)
profile.runcall(JokosherApp.main)

s = stats.load("JokosherApp")

s.strip_dirs()
s.sort_stats("cumulative", "calls").print_stats()
s.sort_stats("time", "calls").print_stats()