path: root/Documentation/technical/hash-function-transition.txt
diff options
authorJeff King <>2019-11-25 14:09:25 (GMT)
committerJunio C Hamano <>2019-11-27 01:48:25 (GMT)
commitb8dcc45387e2dd38f0cc44737f5ab17e7194e7d4 (patch)
treef6986929d26a27aef866d9eafdae6a85f445bfd6 /Documentation/technical/hash-function-transition.txt
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 (diff)
perf-lib: use a single filename for all measurement types
The perf tests write files recording the results of tests. These results are later aggregated by 'aggregate.perl'. If the tests are run multiple times, those results are overwritten by the new results. This works just fine as long as there are only perf tests measuring the times, whose results are stored in "$base".times files. However 22bec79d1a ("t/perf: add infrastructure for measuring sizes", 2018-08-17) introduced a new type of test for measuring the size of something. The results of this are written to "$base".size files. "$base" is essentially made up of the basename of the script plus the test number. So if test numbers shift because a new test was introduced earlier in the script we might end up with both a ".times" and a ".size" file for the same test. In the aggregation script the ".times" file is preferred over the ".size" file, so some size tests might end with performance numbers from a previous run of the test. This is mainly relevant when writing perf tests that check both performance and sizes, and can get quite confusing during developement. We could fix this by doing a more thorough job of cleaning out old ".times" and ".size" files before running each test. However, an even easier solution is to just use the same filename for both types of measurement, meaning we'll always overwrite the previous result. We don't even need to change the file format to distinguish the two; aggregate.perl already decides which is which based on a regex of the content (this may become ambiguous if we add new types in the future, but we could easily add a header field to the file at that point). Based on an initial patch from Thomas Gummerer, who discovered the problem and did all of the analysis (which I stole for the commit message above): Helped-by: Thomas Gummerer <> Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/technical/hash-function-transition.txt')
0 files changed, 0 insertions, 0 deletions