From fab80ee79ddf59a5d00812005bef0fa3acf5b6bf Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Tue, 7 May 2019 12:54:33 +0200 Subject: perf tests: add "bindir" prefix to git tree test results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the output file names in test-results/ to be "test-results/bindir_" rather than just "test-results/". This is for consistency with the "build_" directories we have for built revisions, i.e. "test-results/build_". 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 --- t/perf/aggregate.perl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 't/perf/aggregate.perl') diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl index c8f4a78903..b951747e08 100755 --- a/t/perf/aggregate.perl +++ b/t/perf/aggregate.perl @@ -100,6 +100,7 @@ sub format_size { while (scalar @ARGV) { my $arg = $ARGV[0]; my $dir; + my $prefix = ''; last if -f $arg or $arg eq "--"; if (! -d $arg) { my $rev = Git::command_oneline(qw(rev-parse --verify), $arg); @@ -109,10 +110,11 @@ sub format_size { } else { $dir = realpath($arg); $dirnames{$dir} = $dir; + $prefix .= 'bindir'; } push @dirs, $dir; $dirnames{$dir} ||= $arg; - my $prefix = $dir; + $prefix .= $dir; $prefix =~ tr/^a-zA-Z0-9/_/c; $prefixes{$dir} = $prefix . '.'; shift @ARGV; -- cgit 1.2.3-korg