mercurial/profiling.py
branchstable
changeset 40409 89703e6151e7
parent 40192 b8f6a99ad89b
child 42439 0ae593e791fb
equal deleted inserted replaced
40408:49c7b701fdc2 40409:89703e6151e7
    99         if statprof.state.profile_level == 0:
    99         if statprof.state.profile_level == 0:
   100             statprof.reset(freq)
   100             statprof.reset(freq)
   101     else:
   101     else:
   102         ui.warn(_("invalid sampling frequency '%s' - ignoring\n") % freq)
   102         ui.warn(_("invalid sampling frequency '%s' - ignoring\n") % freq)
   103 
   103 
   104     track = ui.config('profiling', 'time-track')
   104     track = ui.config('profiling', 'time-track',
       
   105                       pycompat.iswindows and 'cpu' or 'real')
   105     statprof.start(mechanism='thread', track=track)
   106     statprof.start(mechanism='thread', track=track)
   106 
   107 
   107     try:
   108     try:
   108         yield
   109         yield
   109     finally:
   110     finally: