Patchwork [1,of,3,STABLE] revsetbenchmarks: modify existing benchmark to perform more work

login
register
mail settings
Submitter Gregory Szorc
Date Sept. 8, 2014, 1:44 a.m.
Message ID <473612a52fabce06be28.1410140674@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/5712/
State Changes Requested
Headers show

Comments

Gregory Szorc - Sept. 8, 2014, 1:44 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1410114802 25200
#      Sun Sep 07 11:33:22 2014 -0700
# Node ID 473612a52fabce06be2851d64f8a45f314d30ac6
# Parent  188b8aa2120b03eead618ba150319074f4e3b42b
revsetbenchmarks: modify existing benchmark to perform more work

The existing roots(x - y) revset only considered the most recent 100
revisions. This was a good start. But expanding it to the full history
of the repository can dramatically increase execution time and is a
better benchmark.
Pierre-Yves David - Sept. 8, 2014, 5:57 a.m.
On 09/08/2014 03:44 AM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1410114802 25200
> #      Sun Sep 07 11:33:22 2014 -0700
> # Node ID 473612a52fabce06be2851d64f8a45f314d30ac6
> # Parent  188b8aa2120b03eead618ba150319074f4e3b42b
> revsetbenchmarks: modify existing benchmark to perform more work
>
> The existing roots(x - y) revset only considered the most recent 100
> revisions. This was a good start. But expanding it to the full history
> of the repository can dramatically increase execution time and is a
> better benchmark.

It is not a better benchmark, it is a different benchmark. Testing with 
smaller entry set is valuable too.

Patch

diff --git a/contrib/revsetbenchmarks.txt b/contrib/revsetbenchmarks.txt
--- a/contrib/revsetbenchmarks.txt
+++ b/contrib/revsetbenchmarks.txt
@@ -13,9 +13,9 @@  tip:0
 max(tip:0)
 min(0:tip)
 0::
 min(0::)
-roots((tip~100::) - (tip~100::tip))
+roots((0::) - (0::tip))
 ::p1(p1(tip))::
 public()
 :10000 and public()
 draft()