summaryrefslogtreecommitdiff
path: root/rdiff-backup/src/profiled_rdb.py
blob: a2f30eaf2ac9fae4da9d0f8c3045dc185d7a0995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python

"""Run rdiff-backup with profiling on

Same as rdiff-backup but runs profiler, and prints profiling
statistics afterwards.

"""

__no_execute__ = 1
execfile("main.py")
import profile, pstats
profile.run("Globals.Main.Main(%s)" % repr(sys.argv[1:]), "profile-output")
p = pstats.Stats("profile-output")
p.sort_stats('time')
p.print_stats(40)
#p.print_callers(20)