Submitter | Pierre-Yves David |
---|---|
Date | Oct. 8, 2019, 11:47 a.m. |
Message ID | <8a6ad5abbf29c925d1b2.1570535275@nodosa.octobus.net> |
Download | mbox | patch |
Permalink | /patch/42102/ |
State | Accepted |
Headers | show |
Comments
On Tue, Oct 8, 2019 at 8:45 PM Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote: > > # HG changeset patch > # User Pierre-Yves David <pierre-yves.david@octobus.net> > # Date 1570513758 14400 > # Tue Oct 08 01:49:18 2019 -0400 > # Node ID 8a6ad5abbf29c925d1b2610714f9e68df1bbc8e1 > # Parent 701f359a9899d1a8b2cafea2aadc1f667dacd385 > # EXP-Topic perf-doc > # Available At https://bitbucket.org/octobus/mercurial-devel/ > # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 8a6ad5abbf29 > perf: document `perfdirfoldmap` > > diff --git a/contrib/perf.py b/contrib/perf.py > --- a/contrib/perf.py > +++ b/contrib/perf.py > @@ -1163,6 +1163,10 @@ def perfdirstatefoldmap(ui, repo, **opts > > @command(b'perfdirfoldmap', formatteropts) > def perfdirfoldmap(ui, repo, **opts): > + """benchmap a `dirstate._map.dirfoldmap.get()` request > + > + The dirstate dirfoldmap cache is dropped between every request. > + """ Looks like we can merge `perdirfoldmap` and `perfdirstatefoldmap` and have file and dir as flags.
On 10/9/19 4:19 PM, Pulkit Goyal wrote: > On Tue, Oct 8, 2019 at 8:45 PM Pierre-Yves David > <pierre-yves.david@ens-lyon.org> wrote: >> >> # HG changeset patch >> # User Pierre-Yves David <pierre-yves.david@octobus.net> >> # Date 1570513758 14400 >> # Tue Oct 08 01:49:18 2019 -0400 >> # Node ID 8a6ad5abbf29c925d1b2610714f9e68df1bbc8e1 >> # Parent 701f359a9899d1a8b2cafea2aadc1f667dacd385 >> # EXP-Topic perf-doc >> # Available At https://bitbucket.org/octobus/mercurial-devel/ >> # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 8a6ad5abbf29 >> perf: document `perfdirfoldmap` >> >> diff --git a/contrib/perf.py b/contrib/perf.py >> --- a/contrib/perf.py >> +++ b/contrib/perf.py >> @@ -1163,6 +1163,10 @@ def perfdirstatefoldmap(ui, repo, **opts >> >> @command(b'perfdirfoldmap', formatteropts) >> def perfdirfoldmap(ui, repo, **opts): >> + """benchmap a `dirstate._map.dirfoldmap.get()` request >> + >> + The dirstate dirfoldmap cache is dropped between every request. >> + """ > > Looks like we can merge `perdirfoldmap` and `perfdirstatefoldmap` and > have file and dir as flags. Maybe ? Adding Raphaël in CC since he know more about theses. I am just doing a simple cleanup pass here.
I think your itch to refactor is premature. It's two different maps that happen to have similar names, I wouldn't worry about it. On 10/9/19 4:21 PM, Pierre-Yves David wrote: > On 10/9/19 4:19 PM, Pulkit Goyal wrote: >> On Tue, Oct 8, 2019 at 8:45 PM Pierre-Yves David >> <pierre-yves.david@ens-lyon.org> wrote: >>> >>> # HG changeset patch >>> # User Pierre-Yves David <pierre-yves.david@octobus.net> >>> # Date 1570513758 14400 >>> # Tue Oct 08 01:49:18 2019 -0400 >>> # Node ID 8a6ad5abbf29c925d1b2610714f9e68df1bbc8e1 >>> # Parent 701f359a9899d1a8b2cafea2aadc1f667dacd385 >>> # EXP-Topic perf-doc >>> # Available At https://bitbucket.org/octobus/mercurial-devel/ >>> # hg pull >>> https://bitbucket.org/octobus/mercurial-devel/ -r 8a6ad5abbf29 >>> perf: document `perfdirfoldmap` >>> >>> diff --git a/contrib/perf.py b/contrib/perf.py >>> --- a/contrib/perf.py >>> +++ b/contrib/perf.py >>> @@ -1163,6 +1163,10 @@ def perfdirstatefoldmap(ui, repo, **opts >>> >>> @command(b'perfdirfoldmap', formatteropts) >>> def perfdirfoldmap(ui, repo, **opts): >>> + """benchmap a `dirstate._map.dirfoldmap.get()` request >>> + >>> + The dirstate dirfoldmap cache is dropped between every request. >>> + """ >> >> Looks like we can merge `perdirfoldmap` and `perfdirstatefoldmap` and >> have file and dir as flags. > > Maybe ? Adding Raphaël in CC since he know more about theses. > I am just doing a simple cleanup pass here. >
Patch
diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -1163,6 +1163,10 @@ def perfdirstatefoldmap(ui, repo, **opts @command(b'perfdirfoldmap', formatteropts) def perfdirfoldmap(ui, repo, **opts): + """benchmap a `dirstate._map.dirfoldmap.get()` request + + The dirstate dirfoldmap cache is dropped between every request. + """ opts = _byteskwargs(opts) timer, fm = gettimer(ui, opts) dirstate = repo.dirstate diff --git a/tests/test-contrib-perf.t b/tests/test-contrib-perf.t --- a/tests/test-contrib-perf.t +++ b/tests/test-contrib-perf.t @@ -105,7 +105,7 @@ perfstatus perfctxfiles (no help text available) perfdiffwd Profile diff of working directory changes perfdirfoldmap - (no help text available) + benchmap a 'dirstate._map.dirfoldmap.get()' request perfdirs (no help text available) perfdirstate benchmap the time necessary to load a dirstate from scratch perfdirstatedirs