Skip to content

Commit fab80ee

Browse files
avargitster
authored andcommitted
perf tests: add "bindir" prefix to git tree test results
Change the output file names in test-results/ to be "test-results/bindir_<munged dir>" rather than just "test-results/<munged dir>". This is for consistency with the "build_" directories we have for built revisions, i.e. "test-results/build_<SHA-1>". There's no user-visible functional changes here, it just makes it easier to see at a glance what "test-results" files are of what "type" as they're all explicitly grouped together now, and to grep this code to find both the run_dirs_helper() implementation and its corresponding aggregate.perl code. Note that we already guarantee that the rest of the PERF_RESULTS_PREFIX is an absolute path, and since it'll start with e.g. "/" which we munge to "_" we'll up with a readable string like "bindir_home_avar[...]". Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
1 parent df0f502 commit fab80ee

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

t/perf/aggregate.perl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ sub format_size {
100100
while (scalar @ARGV) {
101101
my $arg = $ARGV[0];
102102
my $dir;
103+
my $prefix = '';
103104
last if -f $arg or $arg eq "--";
104105
if (! -d $arg) {
105106
my $rev = Git::command_oneline(qw(rev-parse --verify), $arg);
@@ -109,10 +110,11 @@ sub format_size {
109110
} else {
110111
$dir = realpath($arg);
111112
$dirnames{$dir} = $dir;
113+
$prefix .= 'bindir';
112114
}
113115
push @dirs, $dir;
114116
$dirnames{$dir} ||= $arg;
115-
my $prefix = $dir;
117+
$prefix .= $dir;
116118
$prefix =~ tr/^a-zA-Z0-9/_/c;
117119
$prefixes{$dir} = $prefix . '.';
118120
shift @ARGV;

t/perf/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ run_dirs_helper () {
102102
unset GIT_TEST_INSTALLED
103103
elif test -d "$mydir"
104104
then
105-
PERF_RESULTS_PREFIX=$(cd $mydir && printf "%s" "$(pwd)" | tr -c "[a-zA-Z0-9]" "_").
105+
PERF_RESULTS_PREFIX=bindir$(cd $mydir && printf "%s" "$(pwd)" | tr -c "[a-zA-Z0-9]" "_").
106106
set_git_test_installed "$mydir"
107107
else
108108
rev=$(git rev-parse --verify "$mydir" 2>/dev/null) ||

0 commit comments

Comments
 (0)