Mercurial > hg
view contrib/revsetbenchmarks.sh @ 20763:0132cbe30c41
hgk: ignore ctrl-z as EOF on windows
Port a patch from gitk. Original description:
Cygwin's Tcl is configured to honor any occurence of ctrl-z as an
end-of-file marker, while some commits in the git repository and possibly
elsewhere include that character in the commit comment. This causes gitk
ignore commit history following such a comment and incorrect graphs. This
change affects only Windows as Tcl on other platforms already has
eofchar == {}. This fixes problems noted by me and by Ray Lehtiniemi, and
the fix was suggested by Shawn Pierce.
Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
author | Andrew Shadura <andrew@shadura.me> |
---|---|
date | Sat, 15 Mar 2014 15:33:50 +0100 |
parents | 8c89433ccdcf |
children | 44e80bf2688f |
line wrap: on
line source
#!/bin/bash # 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 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. # # This script also does one run of the current version of mercurial installed # to compare performance. HG="hg update" PERF="./hg perfrevset" BASE_PERF="hg perfrevset" TARGETS=$1 shift # read from a file or from standard output if [ $# -ne 0 ]; then readarray REVSETS < $1 else readarray REVSETS fi hg update --quiet echo "Starting time benchmarking" echo echo "Revsets to benchmark" echo "----------------------------" for (( j = 0; j < ${#REVSETS[@]}; j++ )); do echo "${j}) ${REVSETS[$j]}" done echo "----------------------------" echo # Benchmark baseline echo "Benchmarking baseline" for (( j = 0; j < ${#REVSETS[@]}; j++ )); do echo -n "${j}) " $BASE_PERF "${REVSETS[$j]}" done echo echo # Benchmark revisions for i in $(hg log --template='{rev}\n' --rev $TARGETS); do echo "----------------------------" echo -n "Revision: " hg log -r $i --template "{desc|firstline}" echo "----------------------------" $HG $i for (( j = 0; j < ${#REVSETS[@]}; j++ )); do echo -n "${j}) " $PERF "${REVSETS[$j]}" done echo "----------------------------" done $HG # Benchmark current code echo "Benchmarking current code" for (( j = 0; j < ${#REVSETS[@]}; j++ )); do echo -n "${j}) " $PERF "${REVSETS[$j]}" done echo echo "Time benchmarking finished"