forked from mirror/glob
wip
This commit is contained in:
parent
9bf042f426
commit
1c85fdee98
7
bench.sh
7
bench.sh
|
@ -1,14 +1,13 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
tmp=$(mktemp -d /tmp/globbench.XXXXXX)
|
rnd=$(head -c4 </dev/urandom|xxd -p -u)
|
||||||
echo "temp dir is $tmp";
|
|
||||||
|
|
||||||
bench() {
|
bench() {
|
||||||
local exp=".*"
|
local exp=".*"
|
||||||
if [[ ! -z $2 ]]; then
|
if [[ ! -z $2 ]]; then
|
||||||
$exp = $2
|
$exp = $2
|
||||||
fi
|
fi
|
||||||
filename="$tmp/$1.bench"
|
filename=$(echo "$rnd-$1.bench" | tr "/" "_")
|
||||||
if test -e "${filename}";
|
if test -e "${filename}";
|
||||||
then
|
then
|
||||||
echo "Already exists ${filename}"
|
echo "Already exists ${filename}"
|
||||||
|
@ -30,4 +29,4 @@ current=`git rev-parse --abbrev-ref HEAD`
|
||||||
bench ${to} $2
|
bench ${to} $2
|
||||||
bench ${current} $2
|
bench ${current} $2
|
||||||
|
|
||||||
benchcmp $3 "$tmp/${to}.bench" "$tmp/${current}.bench"
|
benchcmp $3 "$rnd-${to}.bench" "$rnd-${current}.bench"
|
||||||
|
|
Loading…
Reference in New Issue