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

Re: Git Test Coverage Report (Tuesday, Sept 25)

From
Derrick Stolee <stolee@gmail.com>
Date
Sep 27, 2018, 15:28 UTC
Message-ID
<07ab14bb-766b-e375-989b-73974ef7fece@gmail.com>
In-Reply-To
<225dc2e3-1aa0-ac19-26e6-59b54dfe871c@gmail.com>
On 9/27/2018 11:21 AM, Ben Peart wrote:
Show 17 quoted lines
>
>
> On 9/26/2018 2:54 PM, Derrick Stolee wrote:
>>
>> GIT_TEST_INDEX_THREADS=1
>>
>
> Because the test repos are so small (ie smaller than 10K files), the 
> test suite already executes as if GIT_TEST_INDEX_THREADS=1 is set (ie 
> single threaded).  I added the test variable so that the 
> multi-threading code could be forced to execute in spite of the 
> default minimum number of files logic.
>
> I'd recommend you set GIT_TEST_INDEX_THREADS=3 instead. (3 because 1 
> thread is used for loading the index extensions and we need 2 or more 
> threads available to exercise multi-threaded loading of the index 
> entries).

According to t/README, GIT_TEST_INDEX_THREADS is a boolean and setting it to 1 causes us to use 3 threads:

     GIT_TEST_INDEX_THREADS=<boolean> forces multi-threaded loading of
     the index cache entries and extensions for the whole test suite.

Here is the only consumption of the variable in the product code (in read-cache.c):

         /* enable testing with fewer than default minimum of entries */
         if (istate->cache_nr > 1 && nr_threads < 3 && 
git_env_bool("GIT_TEST_INDEX_THREADS", 0))
                 nr_threads = 3;

This was non-obvious to me, and I had originally set it to a larger number. I happened to notice the boolean nature while I was looking up the rest of the GIT_TEST_* variables.

Thanks,
-Stolee
Previous: Ben PeartNext: Ævar Arnfjörð Bjarmason
Message 9 of 15 in “Git Test Coverage Report (Tuesday, Sept 25)”
  1. Derrick StoleeSep 25, 2018
  2. Ben PeartSep 25, 2018
  3. Derrick StoleeSep 26, 2018
  4. Jason PyeronSep 26, 2018
  5. Derrick StoleeSep 26, 2018
  6. Thomas GummererSep 26, 2018
  7. Derrick StoleeSep 26, 2018
  8. Ben PeartSep 27, 2018
  9. Derrick StoleeSep 27, 2018
  10. Ævar Arnfjörð BjarmasonSep 27, 2018
  11. Junio C HamanoSep 26, 2018
  12. Derrick StoleeSep 26, 2018
  13. Ben PeartSep 27, 2018
  14. Derrick StoleeSep 27, 2018
  15. Elijah NewrenSep 26, 2018

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.