]> git.ipfire.org Git - thirdparty/git.git/commit
test-path-utils: offer to run a protectNTFS/protectHFS benchmark
authorGarima Singh <garima.singh@microsoft.com>
Wed, 4 Sep 2019 17:36:39 +0000 (13:36 -0400)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 5 Dec 2019 14:36:40 +0000 (15:36 +0100)
commita62f9d1ace8c6556cbc1bb7df69eff0a0bb9e774
treef8bf257b2070986f147000a8638fd522cf070d36
parent525e7fba7854c23ee3530d0bf88d75f106f14c95
test-path-utils: offer to run a protectNTFS/protectHFS benchmark

In preparation to flipping the default on `core.protectNTFS`, let's have
some way to measure the speed impact of this config setting reliably
(and for comparison, the `core.protectHFS` config setting).

For now, this is a manual performance benchmark:

./t/helper/test-path-utils protect_ntfs_hfs [arguments...]

where the arguments are an optional number of file names to test with,
optionally followed by minimum and maximum length of the random file
names. The default values are one million, 3 and 20, respectively.

Just like `sqrti()` in `bisect.c`, we introduce a very simple function
to approximation the square root of a given value, in order to avoid
having to introduce the first user of `<math.h>` in Git's source code.

Note: this is _not_ implemented as a Unix shell script in t/perf/
because we really care about _very_ precise timings here, and Unix shell
scripts are simply unsuited for precise and consistent benchmarking.

Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
t/helper/test-path-utils.c