Skip to content
Snippets Groups Projects
Commit 92e708d6 authored by Scott Chacon's avatar Scott Chacon
Browse files

profiling the push

parent d67d0073
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,15 @@
def gpush(ui, repo, remote_name='origin', branch=None):
git = GitHandler(repo, ui)
git.push(remote_name)
import cProfile, pstats
prof = cProfile.Profile()
prof = prof.runctx("git.push(remote_name)", globals(), locals())
stats = pstats.Stats(prof)
stats.sort_stats("time") # Or cumulative
stats.print_stats(80) # 80 = how many to print
# The rest is optional.
# stats.print_callees()
# stats.print_callers()
def gimport(ui, repo, remote_name=None):
git = GitHandler(repo, ui)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment