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

Re: [PATCH v2 0/4] test-tool: split up "read-cache" tool

From
Taylor Blau <me@ttaylorr.com>
Date
Aug 24, 2021, 22:19 UTC
Message-ID
<YSVwioizjGKVSXQA@nand.local>
In-Reply-To
<cover-v2-0.4-00000000000-20210824T091204Z-avarab@gmail.com>
On Tue, Aug 24, 2021 at 11:15:21AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 11 quoted lines
> A re-roll addressing the feedback v1 got, see
> https://lore.kernel.org/git/cover-0.4-0000000000-20210607T115454Z-avarab@gmail.com
>
> I think the gist of that feedback from Emily was that v1 could be
> understood as aiming to optimize the perf test, but the main reason
> I'm doing this split up is to make the code easier to read. The
> changed commit message summarizes both goals.
>
> I also changed some nits in the code I spotted myself, e.g. "argc > 0"
> checks to just "argc", and a simpler way of providing the "cnt"
> default.

Playing devil's advocate for a moment: I think that the current implementation is somewhat easier to read as it lives in a single file, and makes clear that each option implies different behavior through the body of the loop.

If we're looking for things to clean up, I do like the conversion to the parse-options API instead of reading argv ourselves, but probably otherwise prefer the code as-is instead of split across many files.

But I may be in the minority, and there may be others who do find the split-up version easier to grok.

Thanks, Taylor

Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 16 of 18 in “test-tool: split up "read-cache" tool”
  1. 0/4 test-tool: split up "read-cache" toolÆvar Arnfjörð Bjarmason, Jun 7, 2021
  2. 4/4 read-cache perf: add a perf test for refresh_index()Ævar Arnfjörð Bjarmason, Jun 7, 2021
  3. 3/4 test-tools: migrate read-cache-again to parse_options()Ævar Arnfjörð Bjarmason, Jun 7, 2021
  4. 2/4 test-tools: migrate read-cache-perf to parse_options()Ævar Arnfjörð Bjarmason, Jun 7, 2021
  5. 1/4 test-tool: split up test-tool read-cacheÆvar Arnfjörð Bjarmason, Jun 7, 2021
  6. Junio C HamanoJun 7, 2021
  7. Ævar Arnfjörð BjarmasonJun 8, 2021
  8. Junio C HamanoJun 8, 2021
  9. Emily ShafferJun 30, 2021
  10. Ævar Arnfjörð BjarmasonJun 30, 2021
  11. 0/4 test-tool: split up "read-cache" toolÆvar Arnfjörð Bjarmason, Aug 24, 2021
  12. 1/4 test-tool: split up test-tool read-cacheÆvar Arnfjörð Bjarmason, Aug 24, 2021
  13. 2/4 test-tool: migrate read-cache-perf to parse_options()Ævar Arnfjörð Bjarmason, Aug 24, 2021
  14. 3/4 test-tool: migrate read-cache-again to parse_options()Ævar Arnfjörð Bjarmason, Aug 24, 2021
  15. 4/4 read-cache perf: add a perf test for refresh_index()Ævar Arnfjörð Bjarmason, Aug 24, 2021
  16. Taylor BlauAug 24, 2021
  17. Junio C HamanoAug 25, 2021
  18. Ævar Arnfjörð BjarmasonAug 27, 2021

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.