# HG changeset patch # User Pierre-Yves David # Date 1394837035 25200 # Node ID 47fc466825da86e9b62f709b814782d22916718d # Parent 5fb7c36d751f7538bece8d0a7aa034f78739d280 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. diff -r 5fb7c36d751f -r 47fc466825da contrib/revsetbenchmarks.sh --- 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: "