[PATCH 3 of 3] perfchangelog: add 'perfchangelog' command

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri May 26 14:44:28 EDT 2017



On 05/26/2017 07:07 PM, Gregory Szorc wrote:
> On Tue, May 23, 2017 at 7:04 AM, Pierre-Yves David
> <pierre-yves.david at ens-lyon.org <mailto:pierre-yves.david at ens-lyon.org>>
> wrote:
>
>     # HG changeset patch
>     # User Pierre-Yves David <pierre-yves.david at octobus.net
>     <mailto:pierre-yves.david at octobus.net>>
>     # Date 1495499078 -7200
>     #      Tue May 23 02:24:38 2017 +0200
>     # Node ID 73e20c262b133cf3117a7148e6293b5721e8930d
>     # Parent  c79b8f2a95a35ce1b41325d003337c65bc5bffca
>     # EXP-Topic perf
>     # Available At
>     https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
>     <https://www.mercurial-scm.org/repo/users/marmoute/mercurial/>
>     #              hg pull
>     https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
>     <https://www.mercurial-scm.org/repo/users/marmoute/mercurial/> -r
>     73e20c262b13
>     perfchangelog: add 'perfchangelog' command
>
>     That command monitor the time spend initializing a new changelog object.
>     If I'm not mistaken this includes reading the file on disk and
>     building the
>     nodemap.
>
>
> I also don't like the low-level cache muckery in this patch.

(I'll address that in the other patch)

> Furthermore, the commit message doesn't convince me that this is
> monitoring what you expect it to monitor. As written, the commit message
> implies this is about testing just revlog opening. If so, this should be
> part of one of the perfrevlog* commands.

My goal is to check the amount of time it take to read the data from 
disk and parse nodemap index. This is currently the very bottom line of 
opening a repository and doing any node look up. I do not care about the 
repository filtering steps. (that is kinda covered by perfphases and 
perfvolatileset).

I ruled out perfrevlog because the docstring says "Benchmark reading a 
series of revisions from a revlog" and I do not care about the reading.
If you prefer I can update the command to allow that (eg: "--no-reading" 
flag)

> That being said, repo.changelog
> goes beyond mere revlog opening (it also computes visibility set, etc).
> We should definitely have a perf command for testing that. Whether it
> needs a dedicated command, I'm not sure. I think I'd rather see a
> perfrepoopen command that operates like perfrevlogchunks or
> perfrevlogrevision and measures all the various phases of constructing a
> new repo object and doing a simple changelog index operation to trigger
> changelog load.
>
> That being said, the barrier for perf* commands is low. So I'm fine with
> a perfchangelog command that just tests repo.changelog access as a first
> step towards something grander.

I'm fine with both (updating perfrevlog) or keeping the function. Just 
let me know.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list