diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-06 15:09:23 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-06 15:09:23 -0800 |
commit | 7cb0d37f6dcf8b6f0e176c9080ee0e6a9ce52ab0 (patch) | |
tree | c0dc80fa996f7c3db01671946970a0d241a5cde1 /t/perf | |
parent | Merge branch 'jk/send-pack-check-negative-with-quick' (diff) | |
parent | perf-lib: use a single filename for all measurement types (diff) | |
download | tgif-7cb0d37f6dcf8b6f0e176c9080ee0e6a9ce52ab0.tar.xz |
Merge branch 'tg/perf-remove-stale-result'
PerfTest fix to avoid stale result mixed up with the latest round
of test results.
* tg/perf-remove-stale-result:
perf-lib: use a single filename for all measurement types
Diffstat (limited to 't/perf')
-rwxr-xr-x | t/perf/aggregate.perl | 12 | ||||
-rw-r--r-- | t/perf/perf-lib.sh | 4 |
2 files changed, 5 insertions, 11 deletions
diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl index 66554d2161..112fc23dbe 100755 --- a/t/perf/aggregate.perl +++ b/t/perf/aggregate.perl @@ -219,13 +219,7 @@ sub print_default_results { for my $i (0..$#dirs) { my $d = $dirs[$i]; my $base = "$resultsdir/$prefixes{$d}$t"; - $times{$prefixes{$d}.$t} = []; - foreach my $type (qw(times size)) { - if (-e "$base.$type") { - $times{$prefixes{$d}.$t} = [get_times("$base.$type")]; - last; - } - } + $times{$prefixes{$d}.$t} = [get_times("$base.result")]; my ($r,$u,$s) = @{$times{$prefixes{$d}.$t}}; my $w = length format_times($r,$u,$s,$firstr); $colwidth[$i] = $w if $w > $colwidth[$i]; @@ -267,7 +261,7 @@ sub print_sorted_results { my ($prevr, $prevu, $prevs, $prevrev); for my $i (0..$#dirs) { my $d = $dirs[$i]; - my ($r, $u, $s) = get_times("$resultsdir/$prefixes{$d}$t.times"); + my ($r, $u, $s) = get_times("$resultsdir/$prefixes{$d}$t.result"); if ($i > 0 and defined $r and defined $prevr and $prevr > 0) { my $percent = 100.0 * ($r - $prevr) / $prevr; push @evolutions, { "percent" => $percent, @@ -327,7 +321,7 @@ sub print_codespeed_results { my $commitid = $prefixes{$d}; $commitid =~ s/^build_//; $commitid =~ s/\.$//; - my ($result_value, $u, $s) = get_times("$resultsdir/$prefixes{$d}$t.times"); + my ($result_value, $u, $s) = get_times("$resultsdir/$prefixes{$d}$t.result"); my %vals = ( "commitid" => $commitid, diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index b58a43ea43..13e389367a 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -214,7 +214,7 @@ test_perf_ () { else test_ok_ "$1" fi - "$TEST_DIRECTORY"/perf/min_time.perl test_time.* >"$base".times + "$TEST_DIRECTORY"/perf/min_time.perl test_time.* >"$base".result } test_perf () { @@ -223,7 +223,7 @@ test_perf () { test_size_ () { say >&3 "running: $2" - if test_eval_ "$2" 3>"$base".size; then + if test_eval_ "$2" 3>"$base".result; then test_ok_ "$1" else test_failure_ "$@" |