diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -1580,6 +1580,7 @@ profiling is done using lsprof. Only used by the ``stat`` profiler. + For the ``hotpath`` format, default is ``0.05``. For the ``chrome`` format, default is ``0.005``. The option is unused on other formats. diff --git a/mercurial/profiling.py b/mercurial/profiling.py --- a/mercurial/profiling.py +++ b/mercurial/profiling.py @@ -138,6 +138,9 @@ def statprofile(ui, fp): showmin = ui.configwith(fraction, 'profiling', 'showmin', 0.005) showmax = ui.configwith(fraction, 'profiling', 'showmax', 0.999) kwargs.update(minthreshold=showmin, maxthreshold=showmax) + elif profformat == 'hotpath': + limit = ui.configwith(fraction, 'profiling', 'showmin', 0.05) + kwargs['limit'] = limit statprof.display(fp, data=data, format=displayformat, **kwargs) diff --git a/tests/test-check-config.t b/tests/test-check-config.t --- a/tests/test-check-config.t +++ b/tests/test-check-config.t @@ -33,3 +33,6 @@ New errors are not allowed. Warnings are $ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' | > python contrib/check-config.py + limit = ui.configwith(fraction, 'profiling', 'showmin', 0.05) + + conflict on profiling.showmin: ('with', '0.05') != ('with', '0.005')