summaryrefslogtreecommitdiff
path: root/t/perf
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-04-28 15:49:58 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-04-28 15:49:58 -0700
commit6ae3c797883b1ce8d4138ce08f4ec4901e4dbe50 (patch)
tree6596006db7d773663c8f55cc0eddcdaeca02de18 /t/perf
parentMerge branch 'jk/config-use-size-t' (diff)
parentfast-import: replace custom hash with hashmap.c (diff)
downloadtgif-6ae3c797883b1ce8d4138ce08f4ec4901e4dbe50.tar.xz
Merge branch 'jk/fast-import-use-hashmap'
The custom hash function used by "git fast-import" has been replaced with the one from hashmap.c, which gave us a nice performance boost. * jk/fast-import-use-hashmap: fast-import: replace custom hash with hashmap.c
Diffstat (limited to 't/perf')
-rwxr-xr-xt/perf/p9300-fast-import-export.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/perf/p9300-fast-import-export.sh b/t/perf/p9300-fast-import-export.sh
new file mode 100755
index 0000000000..586161e9ad
--- /dev/null
+++ b/t/perf/p9300-fast-import-export.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+test_description='test fast-import and fast-export performance'
+. ./perf-lib.sh
+
+test_perf_default_repo
+
+# Use --no-data here to produce a vastly smaller export file.
+# This is much cheaper to work with but should still exercise
+# fast-import pretty well (we'll still process all commits and
+# trees, which account for 60% or more of objects in most repos).
+#
+# Use --reencode to avoid the default of aborting on non-utf8 commits,
+# which lets this test run against a wider variety of sample repos.
+test_perf 'export (no-blobs)' '
+ git fast-export --reencode=yes --no-data HEAD >export
+'
+
+test_perf 'import (no-blobs)' '
+ git fast-import --force <export
+'
+
+test_done