mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
This just runs some simple last-modified commands. We already test correctness in the regular suite, so this is just about finding performance regressions from one version to another. Based-on-patch-by: Jeff King <peff@peff.net> Signed-off-by: Toon Claes <toon@iotcl.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 lines
402 B
Bash
Executable File
23 lines
402 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='last-modified perf tests'
|
|
. ./perf-lib.sh
|
|
|
|
test_perf_default_repo
|
|
|
|
test_perf 'top-level last-modified' '
|
|
git last-modified HEAD
|
|
'
|
|
|
|
test_perf 'top-level recursive last-modified' '
|
|
git last-modified -r HEAD
|
|
'
|
|
|
|
test_perf 'subdir last-modified' '
|
|
git ls-tree -d HEAD >subtrees &&
|
|
path="$(head -n 1 subtrees | cut -f2)" &&
|
|
git last-modified -r HEAD -- "$path"
|
|
'
|
|
|
|
test_done
|