about summary refs log tree commit diff
path: root/third_party/git/t/perf
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
commit93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch)
tree85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/t/perf
parent6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff)
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing
changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/t/perf')
-rwxr-xr-xthird_party/git/t/perf/aggregate.perl21
-rwxr-xr-xthird_party/git/t/perf/bisect_regression2
-rwxr-xr-xthird_party/git/t/perf/p5303-many-packs.sh19
-rwxr-xr-xthird_party/git/t/perf/p5310-pack-bitmaps.sh22
-rwxr-xr-xthird_party/git/t/perf/p5600-clone-reference.sh (renamed from third_party/git/t/perf/p5601-clone-reference.sh)0
-rw-r--r--third_party/git/t/perf/perf-lib.sh4
6 files changed, 14 insertions, 54 deletions
diff --git a/third_party/git/t/perf/aggregate.perl b/third_party/git/t/perf/aggregate.perl
index 14e4cda287d7..66554d216122 100755
--- a/third_party/git/t/perf/aggregate.perl
+++ b/third_party/git/t/perf/aggregate.perl
@@ -4,6 +4,7 @@ use lib '../../perl/build/lib';
 use strict;
 use warnings;
 use Getopt::Long;
+use Git;
 use Cwd qw(realpath);
 
 sub get_times {
@@ -84,11 +85,6 @@ sub format_size {
 	return $out;
 }
 
-sub sane_backticks {
-	open(my $fh, '-|', @_);
-	return <$fh>;
-}
-
 my (@dirs, %dirnames, %dirabbrevs, %prefixes, @tests,
     $codespeed, $sortby, $subsection, $reponame);
 
@@ -106,8 +102,7 @@ while (scalar @ARGV) {
 	my $prefix = '';
 	last if -f $arg or $arg eq "--";
 	if (! -d $arg) {
-		my $rev = sane_backticks(qw(git rev-parse --verify), $arg);
-		chomp $rev;
+		my $rev = Git::command_oneline(qw(rev-parse --verify), $arg);
 		$dir = "build/".$rev;
 	} elsif ($arg eq '.') {
 		$dir = '.';
@@ -224,7 +219,13 @@ sub print_default_results {
 		for my $i (0..$#dirs) {
 			my $d = $dirs[$i];
 			my $base = "$resultsdir/$prefixes{$d}$t";
-			$times{$prefixes{$d}.$t} = [get_times("$base.result")];
+			$times{$prefixes{$d}.$t} = [];
+			foreach my $type (qw(times size)) {
+				if (-e "$base.$type") {
+					$times{$prefixes{$d}.$t} = [get_times("$base.$type")];
+					last;
+				}
+			}
 			my ($r,$u,$s) = @{$times{$prefixes{$d}.$t}};
 			my $w = length format_times($r,$u,$s,$firstr);
 			$colwidth[$i] = $w if $w > $colwidth[$i];
@@ -266,7 +267,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.result");
+			my ($r, $u, $s) = get_times("$resultsdir/$prefixes{$d}$t.times");
 			if ($i > 0 and defined $r and defined $prevr and $prevr > 0) {
 				my $percent = 100.0 * ($r - $prevr) / $prevr;
 				push @evolutions, { "percent"  => $percent,
@@ -326,7 +327,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.result");
+			my ($result_value, $u, $s) = get_times("$resultsdir/$prefixes{$d}$t.times");
 
 			my %vals = (
 				"commitid" => $commitid,
diff --git a/third_party/git/t/perf/bisect_regression b/third_party/git/t/perf/bisect_regression
index ce47e1662a92..a94d9955d012 100755
--- a/third_party/git/t/perf/bisect_regression
+++ b/third_party/git/t/perf/bisect_regression
@@ -51,7 +51,7 @@ oldtime=$(echo "$oldtime" | sed -e 's/^\([0-9]\+\.[0-9]\+\).*$/\1/')
 newtime=$(echo "$newtime" | sed -e 's/^\([0-9]\+\.[0-9]\+\).*$/\1/')
 
 test $(echo "$newtime" "$oldtime" | awk '{ print ($1 > $2) }') = 1 ||
-	die "New time '$newtime' should be greater than old time '$oldtime'"
+	die "New time '$newtime' shoud be greater than old time '$oldtime'"
 
 tmpdir=$(mktemp -d -t bisect_regression_XXXXXX) || die "Failed to create temp directory"
 echo "$oldtime" >"$tmpdir/oldtime" || die "Failed to write to '$tmpdir/oldtime'"
diff --git a/third_party/git/t/perf/p5303-many-packs.sh b/third_party/git/t/perf/p5303-many-packs.sh
index 7ee791669a15..377985194116 100755
--- a/third_party/git/t/perf/p5303-many-packs.sh
+++ b/third_party/git/t/perf/p5303-many-packs.sh
@@ -77,7 +77,6 @@ do
 	# actual pack generation, without smudging the on-disk setup
 	# between trials.
 	test_perf "repack ($nr_packs)" '
-		GIT_TEST_FULL_IN_PACK_ARRAY=1 \
 		git pack-objects --keep-true-parents \
 		  --honor-pack-keep --non-empty --all \
 		  --reflog --indexed-objects --delta-base-offset \
@@ -85,22 +84,4 @@ do
 	'
 done
 
-# Measure pack loading with 10,000 packs.
-test_expect_success 'generate lots of packs' '
-	for i in $(test_seq 10000); do
-		echo "blob"
-		echo "data <<EOF"
-		echo "blob $i"
-		echo "EOF"
-		echo "checkpoint"
-	done |
-	git -c fastimport.unpackLimit=0 fast-import
-'
-
-# The purpose of this test is to evaluate load time for a large number
-# of packs while doing as little other work as possible.
-test_perf "load 10,000 packs" '
-	git rev-parse --verify "HEAD^{commit}"
-'
-
 test_done
diff --git a/third_party/git/t/perf/p5310-pack-bitmaps.sh b/third_party/git/t/perf/p5310-pack-bitmaps.sh
index 7743f4f4c9ff..6a3a42531b05 100755
--- a/third_party/git/t/perf/p5310-pack-bitmaps.sh
+++ b/third_party/git/t/perf/p5310-pack-bitmaps.sh
@@ -39,28 +39,6 @@ test_perf 'pack to file (bitmap)' '
 	git pack-objects --use-bitmap-index --all pack1b </dev/null >/dev/null
 '
 
-test_perf 'rev-list (commits)' '
-	git rev-list --all --use-bitmap-index >/dev/null
-'
-
-test_perf 'rev-list (objects)' '
-	git rev-list --all --use-bitmap-index --objects >/dev/null
-'
-
-test_perf 'rev-list count with blob:none' '
-	git rev-list --use-bitmap-index --count --objects --all \
-		--filter=blob:none >/dev/null
-'
-
-test_perf 'rev-list count with blob:limit=1k' '
-	git rev-list --use-bitmap-index --count --objects --all \
-		--filter=blob:limit=1k >/dev/null
-'
-
-test_perf 'simulated partial clone' '
-	git pack-objects --stdout --all --filter=blob:none </dev/null >/dev/null
-'
-
 test_expect_success 'create partial bitmap state' '
 	# pick a commit to represent the repo tip in the past
 	cutoff=$(git rev-list HEAD~100 -1) &&
diff --git a/third_party/git/t/perf/p5601-clone-reference.sh b/third_party/git/t/perf/p5600-clone-reference.sh
index 68fed663479d..68fed663479d 100755
--- a/third_party/git/t/perf/p5601-clone-reference.sh
+++ b/third_party/git/t/perf/p5600-clone-reference.sh
diff --git a/third_party/git/t/perf/perf-lib.sh b/third_party/git/t/perf/perf-lib.sh
index 13e389367a4e..b58a43ea4364 100644
--- a/third_party/git/t/perf/perf-lib.sh
+++ b/third_party/git/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".result
+	"$TEST_DIRECTORY"/perf/min_time.perl test_time.* >"$base".times
 }
 
 test_perf () {
@@ -223,7 +223,7 @@ test_perf () {
 
 test_size_ () {
 	say >&3 "running: $2"
-	if test_eval_ "$2" 3>"$base".result; then
+	if test_eval_ "$2" 3>"$base".size; then
 		test_ok_ "$1"
 	else
 		test_failure_ "$@"