##// END OF EJS Templates
profiling: don't error with statprof when profiling has already started...
Gregory Szorc -
r29785:88d3c1ab default
parent child Browse files
Show More
@@ -88,7 +88,9 b' def statprofile(ui, fp):'
88
88
89 freq = ui.configint('profiling', 'freq', default=1000)
89 freq = ui.configint('profiling', 'freq', default=1000)
90 if freq > 0:
90 if freq > 0:
91 statprof.reset(freq)
91 # Cannot reset when profiler is already active. So silently no-op.
92 if statprof.state.profile_level == 0:
93 statprof.reset(freq)
92 else:
94 else:
93 ui.warn(_("invalid sampling frequency '%s' - ignoring\n") % freq)
95 ui.warn(_("invalid sampling frequency '%s' - ignoring\n") % freq)
94
96
General Comments 0
You need to be logged in to leave comments. Login now