<commit_before>#!/bin/sh

# Usage:
#       check_perf_jdk branch1 branch2 branch3 ...
#
# This script runs all the performance tests on several branch and
# compare the results. PNG files are created in PWD
#
#
# This script only works with a git repository.



TMPDIR=$(mktemp -d)
ORIG_BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 /')

until [ -z "$1" ]
do
	branch="$1"
	shift

	echo "Switching to $branch"
	git co $branch
	rm performanceTests.*
	./compile/build clean junit.performance || exit 1

	mkdir $TMPDIR/$branch
	cp *.Test* $TMPDIR/$branch
done
python $(dirname $0)/perf_graph.py $TMPDIR  performanceTests.bandwidth  performanceTests.throughput
git co $ORIG_BRANCH<commit_msg> /dev/script/perf/check_perf_branch.sh : escape '/' in branch name<commit_after>#!/bin/sh

# Usage:
#       check_perf_jdk branch1 branch2 branch3 ...
#
# This script runs all the performance tests on several branch and
# compare the results. PNG files are created in PWD
#
#
# This script only works with a git repository.



TMPDIR=$(mktemp -d)
ORIG_BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 /')

until [ -z "$1" ]
do
	branch="$1"
	shift

	echo "Switching to $branch"
	git co $branch
	rm performanceTests.*
	./compile/build clean junit.performance || exit 1

        branchdir=$(echo $branch | tr -d '/')

	mkdir -p $TMPDIR/$branchdir
	cp *.Test* $TMPDIR/$branchdir
done
python $(dirname $0)/perf_graph.py $TMPDIR  performanceTests.bandwidth  performanceTests.throughput
git co $ORIG_BRANCH
{'fraction_non_alphanumeric': 0.14220482713633398, 'fraction_numerical': 0.011741682974559686, 'mean_word_length': 3.5791044776119403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '914633', 'n_tokens_mistral': 550, 'n_tokens_neox': 524, 'n_words': 171}