diff mercurial/profiling.py @ 38272:15a1e37f80bd

profiling: introduce a "profiling.time-track" option This option allows to switch the time used by the statistical profiler from cpu to real time. Our goal is to profile IO intensive operations using the mercurial profiler.
author Boris Feld <boris.feld@octobus.net>
date Fri, 01 Jun 2018 17:27:58 +0200
parents e39953fdd924
children b8f6a99ad89b
line wrap: on
line diff
--- a/mercurial/profiling.py	Fri Jun 01 11:23:27 2018 +0200
+++ b/mercurial/profiling.py	Fri Jun 01 17:27:58 2018 +0200
@@ -101,7 +101,8 @@
     else:
         ui.warn(_("invalid sampling frequency '%s' - ignoring\n") % freq)
 
-    statprof.start(mechanism='thread')
+    track = ui.config('profiling', 'time-track')
+    statprof.start(mechanism='thread', track=track)
 
     try:
         yield