Re: [PATCH v3 01/15] diff --color-moved: add perf tests
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 28, 2021, 21:32 UTC
- Message-ID
- <xmqqsfwkq1h4.fsf@gitster.g>
- In-Reply-To
- <8fc8914a37b3c343cd92bb0255088f7b000ff7f7.1635336262.git.gitgitgadget@gmail.com>
"Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 5 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk> > > Add some tests so we can monitor changes to the performance of the > move detection code. The tests record the performance of a single > large diff and a sequence of smaller diffs.
"A single large diff" meaning...?
Show 5 quoted lines
> +if ! git rev-parse --verify v2.29.0^{commit} >/dev/null
> +then
> + skip_all='skipping because tag v2.29.0 was not found'
> + test_done
> +fiHmph. So this is designed only to be run in a clone of git.git with that tag (and a bit of history, at least to v2.28.0 and 1000 commits)?
I am asking primarily because this seems to be the first instance of a test that hardcodes the dependency on our history, instead of allowing the tester to use their favourite history by using the GIT_PERF_LARGE_REPO and GIT_PERF_REPO environment variables.
The intention of the tests themselves looks quite clear. Thanks.
Show 32 quoted lines
> +GIT_PAGER_IN_USE=1 > +test_export GIT_PAGER_IN_USE > + > +test_perf 'diff --no-color-moved --no-color-moved-ws large change' ' > + git diff --no-color-moved --no-color-moved-ws v2.28.0 v2.29.0 > +' > + > +test_perf 'diff --color-moved --no-color-moved-ws large change' ' > + git diff --color-moved=zebra --no-color-moved-ws v2.28.0 v2.29.0 > +' > + > +test_perf 'diff --color-moved-ws=allow-indentation-change large change' ' > + git diff --color-moved=zebra --color-moved-ws=allow-indentation-change \ > + v2.28.0 v2.29.0 > +' > + > +test_perf 'log --no-color-moved --no-color-moved-ws' ' > + git log --no-color-moved --no-color-moved-ws --no-merges --patch \ > + -n1000 v2.29.0 > +' > + > +test_perf 'log --color-moved --no-color-moved-ws' ' > + git log --color-moved=zebra --no-color-moved-ws --no-merges --patch \ > + -n1000 v2.29.0 > +' > + > +test_perf 'log --color-moved-ws=allow-indentation-change' ' > + git log --color-moved=zebra --color-moved-ws=allow-indentation-change \ > + --no-merges --patch -n1000 v2.29.0 > +' > + > +test_done