changeset 20746:47fc466825da

contrib: have the revset benchmark test script take a revset The script now selection revision to run benchmark against using a revset query instead of a revision range. It is expected that people benchmarking revset have some knowledge of revset.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 14 Mar 2014 15:43:55 -0700
parents 5fb7c36d751f
children 8c89433ccdcf
files contrib/revsetbenchmarks.sh
diffstat 1 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/revsetbenchmarks.sh	Fri Mar 14 11:24:59 2014 -0700
+++ b/contrib/revsetbenchmarks.sh	Fri Mar 14 15:43:55 2014 -0700
@@ -1,12 +1,11 @@
 #!/bin/bash
 
-# Measure the performance of a list of revsets on a range of revisions defined
-# by parameter. Checkout one by one and run perfrevset with every revset in the
-# list to benchmark its performance.
+# Measure the performance of a list of revsets against multiple revisions
+# defined by parameter. Checkout one by one and run perfrevset with every
+# revset in the list to benchmark its performance.
 #
-# First argument is the starting revision to measure performance
-# Second argument the ending revision to measure performance
-# Third argument is the file from which the revset array will be taken 
+# First argument is a revset of mercurial own repo to runs against.
+# Second argument is the file from which the revset array will be taken 
 #
 # You should run this from the root of your mercurial repository.
 #
@@ -17,9 +16,8 @@
 PERF="./hg perfrevset"
 BASE_PERF="hg perfrevset"
 
-START=$1
-END=$2
-readarray REVSETS < $3
+TARGETS=$1
+readarray REVSETS < $2
 
 hg update --quiet
 
@@ -50,7 +48,7 @@
 echo
 
 # Benchmark revisions
-for i in $(seq $START $END);
+for i in $(hg log --template='{rev}\n' --rev $TARGETS);
 do
   echo "----------------------------"
   echo -n "Revision: "