Patchwork [8,of,8] test-contrib-perf: drop require slow

login
register
mail settings
Submitter timeless@mozdev.org
Date Dec. 8, 2015, 7:07 a.m.
Message ID <9c79d0772acde5837395.1449558449@waste.org>
Download mbox | patch
Permalink /patch/11931/
State Accepted
Headers show

Comments

timeless@mozdev.org - Dec. 8, 2015, 7:07 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1449558337 0
#      Tue Dec 08 07:05:37 2015 +0000
# Node ID 9c79d0772acde5837395a0a5405276a88a95fe37
# Parent  9ef993e2831acc22e3e6ec58546828598a13e1a5
test-contrib-perf: drop require slow

* skip presleep
* use a stub mode which does not output and generally loops only once
* only use one node for perfparents
Augie Fackler - Dec. 8, 2015, 3:45 p.m.
On Tue, Dec 08, 2015 at 01:07:29AM -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1449558337 0
> #      Tue Dec 08 07:05:37 2015 +0000
> # Node ID 9c79d0772acde5837395a0a5405276a88a95fe37
> # Parent  9ef993e2831acc22e3e6ec58546828598a13e1a5
> test-contrib-perf: drop require slow

Queued these, thanks.

(I'm a little weirded out by the getlen one, but it seems worth it to
have this code tested all the time.)

>
> * skip presleep
> * use a stub mode which does not output and generally loops only once
> * only use one node for perfparents
>
> 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
> @@ -1,4 +1,4 @@
> -#require test-repo slow
> +#require test-repo
>
>  Set vars:
>
> @@ -32,6 +32,10 @@
>    $ cat >> $HGRCPATH << EOF
>    > [extensions]
>    > perfstatusext=$CONTRIBDIR/perf.py
> +  > [perf]
> +  > presleep=0
> +  > stub=on
> +  > parentscount=1
>    > EOF
>    $ hg help perfstatusext
>    perfstatusext extension - helper extension to measure performance
> @@ -97,77 +101,45 @@
>     perfwalk      (no help text available)
>
>    (use "hg help -v perfstatusext" to show built-in aliases and global options)
> -  $ filter_perf_output () {
> -  >     egrep -v 'wall' || true
> -  > }
> -  $ hg perfaddremove 2>&1 | filter_perf_output
> -  $ hg perfancestors 2>&1 | filter_perf_output
> -  $ hg perfancestorset 2 2>&1 | filter_perf_output
> -  $ hg perfannotate a 2>&1 | filter_perf_output
> -  ! result: 3
> -  $ hg perfbranchmap 2>&1 | filter_perf_output
> -  ! base
> -  ! immutable
> -  ! served
> -  ! visible
> -  ! None
> -  $ hg perfcca 2>&1 | filter_perf_output
> -  ! result: <mercurial.scmutil.casecollisionauditor object at 0x*> (glob)
> -  $ hg perfchangeset 2 2>&1 | filter_perf_output
> -  $ hg perfctxfiles 2 2>&1 | filter_perf_output
> -  $ hg perfdiffwd 2>&1 | filter_perf_output
> -  ! diffopts: none
> -  ! diffopts: -w
> -  ! diffopts: -b
> -  ! diffopts: -B
> -  ! diffopts: -wB
> -  $ hg perfdirfoldmap 2>&1 | filter_perf_output
> -  $ hg perfdirs 2>&1 | filter_perf_output
> -  $ hg perfdirstate 2>&1 | filter_perf_output
> -  $ hg perfdirstatedirs 2>&1 | filter_perf_output
> -  $ hg perfdirstatefoldmap 2>&1 | filter_perf_output
> -  $ hg perfdirstatewrite 2>&1 | filter_perf_output
> -  $ hg perffncacheencode 2>&1 | filter_perf_output
> -  $ hg perffncacheload 2>&1 | filter_perf_output
> -  $ hg perffncachewrite 2>&1 | filter_perf_output
> +  $ hg perfaddremove 2>&1
> +  $ hg perfancestors 2>&1
> +  $ hg perfancestorset 2 2>&1
> +  $ hg perfannotate a 2>&1
> +  $ hg perfbranchmap 2>&1
> +  $ hg perfcca 2>&1
> +  $ hg perfchangeset 2 2>&1
> +  $ hg perfctxfiles 2 2>&1
> +  $ hg perfdiffwd 2>&1
> +  $ hg perfdirfoldmap 2>&1
> +  $ hg perfdirs 2>&1
> +  $ hg perfdirstate 2>&1
> +  $ hg perfdirstatedirs 2>&1
> +  $ hg perfdirstatefoldmap 2>&1
> +  $ hg perfdirstatewrite 2>&1
> +  $ hg perffncacheencode 2>&1
> +  $ hg perffncacheload 2>&1
> +  $ hg perffncachewrite 2>&1
>    transaction abort!
>    rollback completed
> -  $ hg perfheads 2>&1 | filter_perf_output
> -  $ hg perfindex 2>&1 | filter_perf_output
> -  $ hg perfloadmarkers 2>&1 | filter_perf_output
> -  $ hg perflog 2>&1 | filter_perf_output
> -  $ hg perflookup 2 2>&1 | filter_perf_output
> -  ! result: 20
> -  $ hg perfmanifest 2 2>&1 | filter_perf_output
> -  $ hg perfmergecalculate -r 3 2>&1 | filter_perf_output
> -  $ hg perfmoonwalk 2>&1 | filter_perf_output
> -  $ hg perfnodelookup 2 2>&1 | filter_perf_output
> -  $ hg perfpathcopies 1 2 2>&1 | filter_perf_output
> -  $ hg perfrawfiles 2 2>&1 | filter_perf_output
> -  $ hg perfrevlog .hg/store/data/a.i 2>&1 | filter_perf_output
> -  $ hg perfrevrange 2>&1 | filter_perf_output
> -  $ hg perfrevset 'all()' 2>&1 | filter_perf_output
> -  $ hg perfstartup 2>&1 | filter_perf_output
> -  $ hg perfstatus 2>&1 | filter_perf_output
> -  $ hg perftags 2>&1 | filter_perf_output
> -  ! result: 1
> -  $ hg perftemplating 2>&1 | filter_perf_output
> -  $ hg perfvolatilesets 2>&1 | filter_perf_output
> -  ! bumped
> -  ! divergent
> -  ! extinct
> -  ! obsolete
> -  ! suspended
> -  ! unstable
> -  ! base
> -  ! immutable
> -  ! served
> -  ! visible
> -  $ hg perfwalk 2>&1 | filter_perf_output
> -  ! result: 1
> +  $ hg perfheads 2>&1
> +  $ hg perfindex 2>&1
> +  $ hg perfloadmarkers 2>&1
> +  $ hg perflog 1 2>&1
> +  $ hg perflookup 2 2>&1
> +  $ hg perfmanifest 2 2>&1
> +  $ hg perfmergecalculate -r 3 2>&1
> +  $ hg perfmoonwalk 2>&1
> +  $ hg perfnodelookup 2 2>&1
> +  $ hg perfpathcopies 1 2 2>&1
> +  $ hg perfrawfiles 2 2>&1
> +  $ hg perfrevlog .hg/store/data/a.i 2>&1
> +  $ hg perfrevrange 2>&1
> +  $ hg perfrevset 'all()' 2>&1
> +  $ hg perfstartup 2>&1
> +  $ hg perfstatus 2>&1
> +  $ hg perftags 2>&1
> +  $ hg perftemplating 1 2>&1
> +  $ hg perfvolatilesets 2>&1
> +  $ hg perfwalk 2>&1
> +  $ hg perfparents 2>&1
>
> -perf parents needs a bigger repo, use the main repo
> -  $ hg perfparents \
> -  > --config extensions.perfstatusext=$CONTRIBDIR/perf.py \
> -  > -R $TESTDIR/.. 2>&1 |grep -v 'obsolete feature' | filter_perf_output
> -
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

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
@@ -1,4 +1,4 @@ 
-#require test-repo slow
+#require test-repo
 
 Set vars:
 
@@ -32,6 +32,10 @@ 
   $ cat >> $HGRCPATH << EOF
   > [extensions]
   > perfstatusext=$CONTRIBDIR/perf.py
+  > [perf]
+  > presleep=0
+  > stub=on
+  > parentscount=1
   > EOF
   $ hg help perfstatusext
   perfstatusext extension - helper extension to measure performance
@@ -97,77 +101,45 @@ 
    perfwalk      (no help text available)
   
   (use "hg help -v perfstatusext" to show built-in aliases and global options)
-  $ filter_perf_output () {
-  >     egrep -v 'wall' || true
-  > }
-  $ hg perfaddremove 2>&1 | filter_perf_output
-  $ hg perfancestors 2>&1 | filter_perf_output
-  $ hg perfancestorset 2 2>&1 | filter_perf_output
-  $ hg perfannotate a 2>&1 | filter_perf_output
-  ! result: 3
-  $ hg perfbranchmap 2>&1 | filter_perf_output
-  ! base
-  ! immutable
-  ! served
-  ! visible
-  ! None
-  $ hg perfcca 2>&1 | filter_perf_output
-  ! result: <mercurial.scmutil.casecollisionauditor object at 0x*> (glob)
-  $ hg perfchangeset 2 2>&1 | filter_perf_output
-  $ hg perfctxfiles 2 2>&1 | filter_perf_output
-  $ hg perfdiffwd 2>&1 | filter_perf_output
-  ! diffopts: none
-  ! diffopts: -w
-  ! diffopts: -b
-  ! diffopts: -B
-  ! diffopts: -wB
-  $ hg perfdirfoldmap 2>&1 | filter_perf_output
-  $ hg perfdirs 2>&1 | filter_perf_output
-  $ hg perfdirstate 2>&1 | filter_perf_output
-  $ hg perfdirstatedirs 2>&1 | filter_perf_output
-  $ hg perfdirstatefoldmap 2>&1 | filter_perf_output
-  $ hg perfdirstatewrite 2>&1 | filter_perf_output
-  $ hg perffncacheencode 2>&1 | filter_perf_output
-  $ hg perffncacheload 2>&1 | filter_perf_output
-  $ hg perffncachewrite 2>&1 | filter_perf_output
+  $ hg perfaddremove 2>&1
+  $ hg perfancestors 2>&1
+  $ hg perfancestorset 2 2>&1
+  $ hg perfannotate a 2>&1
+  $ hg perfbranchmap 2>&1
+  $ hg perfcca 2>&1
+  $ hg perfchangeset 2 2>&1
+  $ hg perfctxfiles 2 2>&1
+  $ hg perfdiffwd 2>&1
+  $ hg perfdirfoldmap 2>&1
+  $ hg perfdirs 2>&1
+  $ hg perfdirstate 2>&1
+  $ hg perfdirstatedirs 2>&1
+  $ hg perfdirstatefoldmap 2>&1
+  $ hg perfdirstatewrite 2>&1
+  $ hg perffncacheencode 2>&1
+  $ hg perffncacheload 2>&1
+  $ hg perffncachewrite 2>&1
   transaction abort!
   rollback completed
-  $ hg perfheads 2>&1 | filter_perf_output
-  $ hg perfindex 2>&1 | filter_perf_output
-  $ hg perfloadmarkers 2>&1 | filter_perf_output
-  $ hg perflog 2>&1 | filter_perf_output
-  $ hg perflookup 2 2>&1 | filter_perf_output
-  ! result: 20
-  $ hg perfmanifest 2 2>&1 | filter_perf_output
-  $ hg perfmergecalculate -r 3 2>&1 | filter_perf_output
-  $ hg perfmoonwalk 2>&1 | filter_perf_output
-  $ hg perfnodelookup 2 2>&1 | filter_perf_output
-  $ hg perfpathcopies 1 2 2>&1 | filter_perf_output
-  $ hg perfrawfiles 2 2>&1 | filter_perf_output
-  $ hg perfrevlog .hg/store/data/a.i 2>&1 | filter_perf_output
-  $ hg perfrevrange 2>&1 | filter_perf_output
-  $ hg perfrevset 'all()' 2>&1 | filter_perf_output
-  $ hg perfstartup 2>&1 | filter_perf_output
-  $ hg perfstatus 2>&1 | filter_perf_output
-  $ hg perftags 2>&1 | filter_perf_output
-  ! result: 1
-  $ hg perftemplating 2>&1 | filter_perf_output
-  $ hg perfvolatilesets 2>&1 | filter_perf_output
-  ! bumped
-  ! divergent
-  ! extinct
-  ! obsolete
-  ! suspended
-  ! unstable
-  ! base
-  ! immutable
-  ! served
-  ! visible
-  $ hg perfwalk 2>&1 | filter_perf_output
-  ! result: 1
+  $ hg perfheads 2>&1
+  $ hg perfindex 2>&1
+  $ hg perfloadmarkers 2>&1
+  $ hg perflog 1 2>&1
+  $ hg perflookup 2 2>&1
+  $ hg perfmanifest 2 2>&1
+  $ hg perfmergecalculate -r 3 2>&1
+  $ hg perfmoonwalk 2>&1
+  $ hg perfnodelookup 2 2>&1
+  $ hg perfpathcopies 1 2 2>&1
+  $ hg perfrawfiles 2 2>&1
+  $ hg perfrevlog .hg/store/data/a.i 2>&1
+  $ hg perfrevrange 2>&1
+  $ hg perfrevset 'all()' 2>&1
+  $ hg perfstartup 2>&1
+  $ hg perfstatus 2>&1
+  $ hg perftags 2>&1
+  $ hg perftemplating 1 2>&1
+  $ hg perfvolatilesets 2>&1
+  $ hg perfwalk 2>&1
+  $ hg perfparents 2>&1
 
-perf parents needs a bigger repo, use the main repo
-  $ hg perfparents \
-  > --config extensions.perfstatusext=$CONTRIBDIR/perf.py \
-  > -R $TESTDIR/.. 2>&1 |grep -v 'obsolete feature' | filter_perf_output
-