Deal with the fact that ordering of tag commits will vary with ordering of
[cvs2svn.git] / profile-cvs2svn.py
blob848d98256e2dadf7e4a42238a96a2978f49892c8
1 #!/usr/bin/env python
3 # Use this script to profile cvs2svn.py using Python's hotshot profiler.
5 # The profile data is stored in cvs2svn.hotshot. To view the data using
6 # hotshot, run the following in python:
7 #
8 # import hotshot.stats
9 # stats = hotshot.stats.load('cvs2svn.hotshot')
10 # stats.strip_dirs()
11 # stats.sort_stats('time', 'calls')
12 # stats.print_stats(20)
14 # It is also possible (and a lot better) to use kcachegrind to view the data.
15 # To do so, you must first convert the data to the cachegrind format using
16 # hotshot2cachegrind, which you can download from the following URL:
18 # http://kcachegrind.sourceforge.net/cgi-bin/show.cgi/KcacheGrindContribPython
20 # Convert the data using the following command:
22 # hotshot2cachegrind -o cachegrind.out cvs2svn.hotshot
24 # Depending on the size of the repository, this can take a long time. When
25 # the conversion is done, simply open cachegrind.out in kcachegrind.
27 import cvs2svn, hotshot
29 prof = hotshot.Profile('cvs2svn.hotshot')
30 prof.runcall(cvs2svn.main)
31 prof.close()