mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
contrib: make revset benchmark script able to read from stdin
This help fine control of what we want to benchmark
This commit is contained in:
parent
e850278a13
commit
2711ccc7d9
@ -4,8 +4,9 @@
|
||||
# defined by parameter. Checkout one by one and run perfrevset with every
|
||||
# revset in the list to benchmark its performance.
|
||||
#
|
||||
# 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
|
||||
# - 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
|
||||
# If second argument is omitted read it from standard input
|
||||
#
|
||||
# You should run this from the root of your mercurial repository.
|
||||
#
|
||||
@ -17,7 +18,13 @@ PERF="./hg perfrevset"
|
||||
BASE_PERF="hg perfrevset"
|
||||
|
||||
TARGETS=$1
|
||||
readarray REVSETS < $2
|
||||
shift
|
||||
# read from a file or from standard output
|
||||
if [ $# -ne 0 ]; then
|
||||
readarray REVSETS < $1
|
||||
else
|
||||
readarray REVSETS
|
||||
fi
|
||||
|
||||
hg update --quiet
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user