git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t/perf: use 'test_file_size' in more places

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 22, 2024, 00:47 UTC
Message-ID
<xmqqed34dri0.fsf@gitster.g>
In-Reply-To
<50c1368630684f235548d2e9a68d4de3745b5fe6.1732220875.git.me@ttaylorr.com>
Taylor Blau <me@ttaylorr.com> writes:
> The perf test suite prefers to use test_file_size over 'wc -c' when
> inside of a test_size block. One advantage is that accidentally writign
> "wc -c file" (instead of "wc -c <file") does not inadvertently break the
> tests (since the former will include the filename in the output of wc).

Another advantage is, instead of reading through the file and counting bytes, the helper uses stat() without reading. For a performance test that potentially deals with a large-ish file, it probably counts (pun intended) more.

Will queue.  Thanks.
Previous: Taylor BlauNext: Jeff King
Message 2 of 3 in “t/perf: use 'test_file_size' in more places”
  1. t/perf: use 'test_file_size' in more placesTaylor Blau, Nov 21, 2024
  2. Junio C HamanoNov 22, 2024
  3. Jeff KingNov 22, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.