Mercurial > hg-stable
changeset 50839:cf0502231d56
perf: display all timing by default
This is much more useful and end up enable it everywhere.
I don't think we have strong backward compatibility guarantee for perf.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 23 Jun 2023 13:27:09 +0200 |
parents | ee1617c04858 |
children | 609a3b8058c3 |
files | contrib/perf.py tests/test-contrib-perf.t |
diffstat | 2 files changed, 44 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Mon Jul 10 10:53:12 2023 +0200 +++ b/contrib/perf.py Fri Jun 23 13:27:09 2023 +0200 @@ -456,7 +456,7 @@ return functools.partial(stub_timer, fm), fm # experimental config: perf.all-timing - displayall = ui.configbool(b"perf", b"all-timing", False) + displayall = ui.configbool(b"perf", b"all-timing", True) # experimental config: perf.run-limits limitspec = ui.configlist(b"perf", b"run-limits", []) @@ -3359,7 +3359,7 @@ # get a formatter fm = ui.formatter(b'perf', opts) - displayall = ui.configbool(b"perf", b"all-timing", False) + displayall = ui.configbool(b"perf", b"all-timing", True) # print individual details if requested if opts['details']:
--- a/tests/test-contrib-perf.t Mon Jul 10 10:53:12 2023 +0200 +++ b/tests/test-contrib-perf.t Fri Jun 23 13:27:09 2023 +0200 @@ -301,23 +301,38 @@ $ hg perfparents --config perf.stub=no --config perf.run-limits='0.000000001-15' ! wall * comb * user * sys * (best of 15) (glob) + ! wall * comb * user * sys * (max of 15) (glob) + ! wall * comb * user * sys * (avg of 15) (glob) + ! wall * comb * user * sys * (median of 15) (glob) Multiple entries $ hg perfparents --config perf.stub=no --config perf.run-limits='500000-1, 0.000000001-50' ! wall * comb * user * sys * (best of 50) (glob) + ! wall * comb * user * sys 0.000000 (max of 50) (glob) + ! wall * comb * user * sys 0.000000 (avg of 50) (glob) + ! wall * comb * user * sys 0.000000 (median of 50) (glob) error case are ignored $ hg perfparents --config perf.stub=no --config perf.run-limits='500, 0.000000001-50' malformatted run limit entry, missing "-": 500 ! wall * comb * user * sys * (best of 50) (glob) + ! wall * comb * user * sys * (max of 50) (glob) + ! wall * comb * user * sys * (avg of 50) (glob) + ! wall * comb * user * sys * (median of 50) (glob) $ hg perfparents --config perf.stub=no --config perf.run-limits='aaa-120, 0.000000001-50' malformatted run limit entry, could not convert string to float: 'aaa': aaa-120 ! wall * comb * user * sys * (best of 50) (glob) + ! wall * comb * user * sys * (max of 50) (glob) + ! wall * comb * user * sys * (avg of 50) (glob) + ! wall * comb * user * sys * (median of 50) (glob) $ hg perfparents --config perf.stub=no --config perf.run-limits='120-aaaaaa, 0.000000001-50' malformatted run limit entry, invalid literal for int() with base 10: 'aaaaaa': 120-aaaaaa ! wall * comb * user * sys * (best of 50) (glob) + ! wall * comb * user * sys * (max of 50) (glob) + ! wall * comb * user * sys * (avg of 50) (glob) + ! wall * comb * user * sys * (median of 50) (glob) test actual output ------------------ @@ -326,6 +341,9 @@ $ hg perfheads --config perf.stub=no ! wall * comb * user * sys * (best of *) (glob) + ! wall * comb * user * sys * (max of *) (glob) + ! wall * comb * user * sys * (avg of *) (glob) + ! wall * comb * user * sys * (median of *) (glob) detailed output: @@ -343,8 +361,23 @@ $ hg perfheads --template json --config perf.stub=no [ { + "avg.comb": *, (glob) + "avg.count": *, (glob) + "avg.sys": *, (glob) + "avg.user": *, (glob) + "avg.wall": *, (glob) "comb": *, (glob) "count": *, (glob) + "max.comb": *, (glob) + "max.count": *, (glob) + "max.sys": *, (glob) + "max.user": *, (glob) + "max.wall": *, (glob) + "median.comb": *, (glob) + "median.count": *, (glob) + "median.sys": *, (glob) + "median.user": *, (glob) + "median.wall": *, (glob) "sys": *, (glob) "user": *, (glob) "wall": * (glob) @@ -386,13 +419,22 @@ $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=0 ! wall * comb * user * sys * (best of 1) (glob) + ! wall * comb * user * sys * (max of 1) (glob) + ! wall * comb * user * sys * (avg of 1) (glob) + ! wall * comb * user * sys * (median of 1) (glob) searching for changes $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=1 ! wall * comb * user * sys * (best of 1) (glob) + ! wall * comb * user * sys * (max of 1) (glob) + ! wall * comb * user * sys * (avg of 1) (glob) + ! wall * comb * user * sys * (median of 1) (glob) searching for changes searching for changes $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=3 ! wall * comb * user * sys * (best of 1) (glob) + ! wall * comb * user * sys * (max of 1) (glob) + ! wall * comb * user * sys * (avg of 1) (glob) + ! wall * comb * user * sys * (median of 1) (glob) searching for changes searching for changes searching for changes