[PATCH 5/5] cli/git-remote: add time performance test

Subject: [PATCH 5/5] cli/git-remote: add time performance test

Date: Wed, 28 Aug 2024 08:45:58 -0700

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


Memory tests already existed (for correctness) but this helps sanity
check the performance to make sure we are in the same range as the
existing notmuch-git script.
---
 performance-test/T08-git-remote.sh | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100755 performance-test/T08-git-remote.sh

diff --git a/performance-test/T08-git-remote.sh b/performance-test/T08-git-remote.sh
new file mode 100755
index 00000000..799e221b
--- /dev/null
+++ b/performance-test/T08-git-remote.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+test_description='git-remote-notmuch'
+
+. $(dirname "$0")/perf-test-lib.sh || exit 1
+
+export GIT_COMMITTER_NAME="Notmuch Test Suite"
+export GIT_COMMITTER_EMAIL="notmuch@example.com"
+
+time_start
+
+time_run 'clone --bare' "git clone --quiet --bare notmuch::default default.git"
+time_run 'clone' "git clone --quiet notmuch::default"
+
+cd default
+hash=$(git hash-object --stdin -w < /dev/null)
+# replace all files with empty files
+git ls-tree -r HEAD | sed "s/blob [^\t]*/blob $hash/" | git update-index --index-info
+git commit -m'zero tags' 2>>log.txt 1>&2
+
+time_run "push" "git push --quiet origin master"
+
+time_done
-- 
2.43.0

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: