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

[PATCH v3 00/10] commit-graph write: progress output improvements

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 22, 2018, 15:39 UTC
Message-ID
<20181122153922.16912-1-avarab@gmail.com>
In-Reply-To
<20181122132823.9883-1-avarab@gmail.com>

The "Writing out" progress output was off-by-one because I'd screwed up a merge conflict. Fix that, and update the various progress output.

On my test setup the "Annotating commit graph" progress sometimes shows up on linux.git, sometimes not, it's right on that edge of taking 1 second. So always show it in the commit message examples, that's less confusing for the reader.

SZEDER Gábor (2):
  commit-graph: rename 'num_extra_edges' variable to 'num_large_edges'
  commit-graph: don't call write_graph_chunk_large_edges() unnecessarily
Ævar Arnfjörð Bjarmason (8):
  commit-graph write: rephrase confusing progress output
  commit-graph write: add "Writing out" progress output
  commit-graph write: more descriptive "writing out" output
  commit-graph write: show progress for object search
  commit-graph write: add more descriptive progress output
  commit-graph write: remove empty line for readability
  commit-graph write: add itermediate progress
  commit-graph write: emit a percentage for all progress
 commit-graph.c | 130 ++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 102 insertions(+), 28 deletions(-)
Range-diff:
1:  2b52ad2284 ! 1:  9c17f56ed3 commit-graph write: add "Writing out" progress output
     a => b | 0
     1 file changed, 0 insertions(+), 0 deletions(-)
    
    @@ -15,10 +15,11 @@
     
             $ ~/g/git/git --exec-path=$HOME/g/git commit-graph write
             Finding commits for commit graph: 6365442, done.
    +        Annotating commit graph: 2391666, done.
             Computing commit graph generation numbers: 100% (797222/797222), done.
    -        Writing out commit graph: 100% (3986110/3986110), done.
    +        Writing out commit graph: 100% (3188888/3188888), done.
     
    -    This "Writing out" number is 4x or 5x the number of commits, depending
    +    This "Writing out" number is 3x or 4x the number of commits, depending
         on the graph we're processing. A later change will make this explicit
         to the user.
     
    @@ -126,7 +127,7 @@
     +		 * below loops over our N commits. This number must be
     +		 * kept in sync with the number of passes we're doing.
     +		 */
    -+		int graph_passes = 4;
    ++		int graph_passes = 3;
     +		if (num_large_edges)
     +			graph_passes++;
     +		progress = start_delayed_progress(
2:  b1773677b1 ! 2:  79b0a467d9 commit-graph write: more descriptive "writing out" output
     a => b | 0
     1 file changed, 0 insertions(+), 0 deletions(-)
    
    @@ -3,7 +3,7 @@
         commit-graph write: more descriptive "writing out" output
     
         Make the "Writing out" part of the progress output more
    -    descriptive. Depending on the shape of the graph we either make 4 or 5
    +    descriptive. Depending on the shape of the graph we either make 3 or 4
         passes over it.
     
         Let's present this information to the user in case they're wondering
    @@ -13,8 +13,9 @@
     
             $ ~/g/git/git --exec-path=$HOME/g/git commit-graph write
             Finding commits for commit graph: 6365442, done.
    +        Annotating commit graph: 2391666, done.
             Computing commit graph generation numbers: 100% (797222/797222), done.
    -        Writing out commit graph in 5 passes: 100% (3986110/3986110), done.
    +        Writing out commit graph in 4 passes: 100% (3188888/3188888), done.
     
         A note on i18n: Why are we using the Q_() function and passing a
         number & English text for a singular which'll never be used? Because
    @@ -35,7 +36,7 @@
      	if (!commit_graph_compatible(the_repository))
      		return;
     @@
    - 		int graph_passes = 4;
    + 		int graph_passes = 3;
      		if (num_large_edges)
      			graph_passes++;
     +		strbuf_addf(&progress_title,
3:  3138b00a2c ! 3:  b32be83b38 commit-graph write: show progress for object search
     a => b | 0
     1 file changed, 0 insertions(+), 0 deletions(-)
    
    @@ -8,12 +8,12 @@
     
         Before we'd emit on e.g. linux.git with "commit-graph write":
     
    -        Finding commits for commit graph: 6365492, done.
    +        Finding commits for commit graph: 6365442, done.
             [...]
     
         And now:
     
    -        Finding commits for commit graph: 100% (6365492/6365492), done.
    +        Finding commits for commit graph: 100% (6365442/6365442), done.
             [...]
     
         Since the commit graph only includes those commits that are packed
4:  f41e3b3eb3 ! 4:  54276723c0 commit-graph write: add more descriptive progress output
     a => b | 0
     1 file changed, 0 insertions(+), 0 deletions(-)
    
    @@ -10,7 +10,7 @@
         we support:
     
             $ git commit-graph write
    -        Finding commits for commit graph among packed objects: 100% (6365492/6365492), done.
    +        Finding commits for commit graph among packed objects: 100% (6365442/6365442), done.
             [...]
     
             # Actually we don't emit this since this takes almost no time at
    @@ -20,7 +20,7 @@
             [...]
     
             $ (cd .git/objects/pack/ && ls *idx) | git commit-graph write --stdin-pack
    -        Finding commits for commit graph in 3 packs: 6365492, done.
    +        Finding commits for commit graph in 2 packs: 6365442, done.
             [...]
     
         The middle on of those is going to be the output users might see in
5:  74037032d3 = 5:  0e847366e1 commit-graph write: remove empty line for readability
     a => b | 0
     1 file changed, 0 insertions(+), 0 deletions(-)
    
6:  502da68d14 ! 6:  c388aff73e commit-graph write: add itermediate progress
     a => b | 0
     1 file changed, 0 insertions(+), 0 deletions(-)
    
    @@ -10,22 +10,22 @@
         million objects we'll now emit:
     
             $ ~/g/git/git --exec-path=$HOME/g/git commit-graph write
    -        Finding commits for commit graph among packed objects: 100% (50026015/50026015), done.
    -        Annotating commit graph: 21567407, done.
    -        Counting distinct commits in commit graph: 100% (7189147/7189147), done.
    -        Finding extra edges in commit graph: 100% (7189147/7189147), done.
    -        Computing commit graph generation numbers: 100% (7144680/7144680), done.
    -        Writing out commit graph: 21434417, done.
    +        Finding commits for commit graph among packed objects: 100% (48333911/48333911), done.
    +        Annotating commit graph: 21435984, done.
    +        Counting distinct commits in commit graph: 100% (7145328/7145328), done.
    +        Finding extra edges in commit graph: 100% (7145328/7145328), done.
    +        Computing commit graph generation numbers: 100% (7145328/7145328), done.
    +        Writing out commit graph in 4 passes: 100% (28581312/28581312), done.
     
         Whereas on a medium-sized repository such as linux.git these new
         progress bars won't have time to kick in and as before and we'll still
         emit output like:
     
             $ ~/g/git/git --exec-path=$HOME/g/git commit-graph write
    -        Finding commits for commit graph among packed objects: 100% (6365492/6365492), done.
    +        Finding commits for commit graph among packed objects: 100% (6365442/6365442), done.
             Annotating commit graph: 2391666, done.
             Computing commit graph generation numbers: 100% (797222/797222), done.
    -        Writing out commit graph: 2399912, done.
    +        Writing out commit graph in 4 passes: 100% (3188888/3188888), done.
     
         The "Counting distinct commits in commit graph" phase will spend most
         of its time paused at "0/*" as we QSORT(...) the list. That's not
7:  dfaf840983 ! 7:  fd692499e0 commit-graph write: emit a percentage for all progress
     a => b | 0
     1 file changed, 0 insertions(+), 0 deletions(-)
    
    @@ -7,22 +7,13 @@
         write: add progress output", 2018-09-17) and evidently didn't notice
         how easy it was to add a completion percentage.
     
    -    Now for the very large test repository mentioned in previous commits
    -    we'll emit (shows all progress output):
    -
    -        Finding commits for commit graph among packed objects: 100% (48333911/48333911), done.
    -        Annotating commit graph: 100% (21435984/21435984), done.
    -        Counting distinct commits in commit graph: 100% (7145328/7145328), done.
    -        Finding extra edges in commit graph: 100% (7145328/7145328), done.
    -        Computing commit graph generation numbers: 100% (7145328/7145328), done.
    -        Writing out commit graph in 5 passes: 100% (35726640/35726640), done.
    -
    -    And for linux.git:
    +    Now for e.g. linux.git we'll emit:
     
    +        ~/g/git/git --exec-path=$HOME/g/git commit-graph write
             Finding commits for commit graph among packed objects: 100% (6365442/6365442), done.
             Annotating commit graph: 100% (2391666/2391666), done.
             Computing commit graph generation numbers: 100% (797222/797222), done.
    -        Writing out commit graph in 5 passes: 100% (3986110/3986110), done.
    +        Writing out commit graph in 4 passes: 100% (3188888/3188888), done.
     
         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
     
-- 
2.20.0.rc0.387.gc7a69e6b6c
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 67 of 133 in “commit-graph: add progress output”
  1. 0/2 commit-graph: add progress outputÆvar Arnfjörð Bjarmason, Sep 4, 2018
  2. 2/2 commit-graph verify: add progress outputÆvar Arnfjörð Bjarmason, Sep 4, 2018
  3. Junio C HamanoSep 4, 2018
  4. 1/2 commit-graph write: add progress outputÆvar Arnfjörð Bjarmason, Sep 4, 2018
  5. Eric SunshineSep 4, 2018
  6. Junio C HamanoSep 4, 2018
  7. Derrick StoleeSep 5, 2018
  8. Ævar Arnfjörð BjarmasonSep 5, 2018
  9. Junio C HamanoSep 5, 2018
  10. Derrick StoleeSep 5, 2018
  11. Ævar Arnfjörð BjarmasonSep 7, 2018
  12. Ævar Arnfjörð BjarmasonSep 7, 2018
  13. Jeff KingSep 7, 2018
  14. Derrick StoleeSep 7, 2018
  15. Derrick StoleeSep 5, 2018
  16. Ævar Arnfjörð BjarmasonSep 7, 2018
  17. Derrick StoleeSep 7, 2018
  18. Derrick StoleeSep 5, 2018
  19. 0/2 commit-graph: add progress outputÆvar Arnfjörð Bjarmason, Sep 7, 2018
  20. Junio C HamanoSep 11, 2018
  21. 1/2 commit-graph write: add progress outputÆvar Arnfjörð Bjarmason, Sep 7, 2018
  22. Derrick StoleeSep 21, 2018
  23. Junio C HamanoSep 21, 2018
  24. Junio C HamanoSep 21, 2018
  25. 2/2 commit-graph verify: add progress outputÆvar Arnfjörð Bjarmason, Sep 7, 2018
  26. Duy NguyenSep 16, 2018
  27. 0/2 commit-graph: add progress outputÆvar Arnfjörð Bjarmason, Sep 17, 2018
  28. 1/2 commit-graph write: add progress outputÆvar Arnfjörð Bjarmason, Sep 17, 2018
  29. SZEDER GáborOct 10, 2018
  30. Ævar Arnfjörð BjarmasonOct 10, 2018
  31. SZEDER GáborOct 10, 2018
  32. Ævar Arnfjörð BjarmasonOct 10, 2018
  33. Ævar Arnfjörð BjarmasonOct 11, 2018
  34. SZEDER GáborOct 15, 2018
  35. Junio C HamanoOct 12, 2018
  36. Ævar Arnfjörð BjarmasonOct 12, 2018
  37. Derrick StoleeOct 12, 2018
  38. SZEDER GáborOct 15, 2018
  39. SZEDER GáborNov 19, 2018
  40. commit-graph: split up close_reachable() progress outputÆvar Arnfjörð Bjarmason, Nov 19, 2018
  41. Derrick StoleeNov 19, 2018
  42. SZEDER GáborNov 19, 2018
  43. 0/6 commit-graph write: progress output improvementsÆvar Arnfjörð Bjarmason, Nov 20, 2018
  44. 1/6 commit-graph write: rephrase confusing progress outputÆvar Arnfjörð Bjarmason, Nov 20, 2018
  45. 2/6 commit-graph write: add more progress outputÆvar Arnfjörð Bjarmason, Nov 20, 2018
  46. SZEDER GáborNov 20, 2018
  47. 0/6 commit-graph write: progress output improvementsÆvar Arnfjörð Bjarmason, Nov 20, 2018
  48. 1/6 commit-graph write: rephrase confusing progress outputÆvar Arnfjörð Bjarmason, Nov 20, 2018
  49. 2/6 commit-graph write: add more progress outputÆvar Arnfjörð Bjarmason, Nov 20, 2018
  50. SZEDER GáborNov 20, 2018
  51. 3/6 commit-graph write: show progress for object searchÆvar Arnfjörð Bjarmason, Nov 20, 2018
  52. 4/6 commit-graph write: add more describing progress outputÆvar Arnfjörð Bjarmason, Nov 20, 2018
  53. 5/6 commit-graph write: remove empty line for readabilityÆvar Arnfjörð Bjarmason, Nov 20, 2018
  54. 6/6 commit-graph write: add even more progress outputÆvar Arnfjörð Bjarmason, Nov 20, 2018
  55. SZEDER Gábor, Nov 21, 2018
  56. 1/2 commit-graph: rename 'num_extra_edges' variable to 'num_large_edges'SZEDER Gábor, Nov 21, 2018
  57. Junio C HamanoNov 21, 2018
  58. Derrick StoleeNov 21, 2018
  59. 0/2 commit-graph: minor cleanup and optimizationSZEDER Gábor, Jan 18, 2019
  60. 1/2 commit-graph: rename "large edges" to "extra edges"SZEDER Gábor, Jan 18, 2019
  61. 2/2 commit-graph: don't call write_graph_chunk_large_edges() unnecessarilySZEDER Gábor, Jan 18, 2019
  62. Martin ÅgrenJan 19, 2019
  63. Junio C HamanoJan 18, 2019
  64. 2/2 commit-graph: don't call write_graph_chunk_large_edges() unnecessarilySZEDER Gábor, Nov 21, 2018
  65. Derrick StoleeNov 21, 2018
  66. 00/10 commit-graph write: progress output improvementsÆvar Arnfjörð Bjarmason, Nov 22, 2018
  67. 00/10 commit-graph write: progress output improvementsÆvar Arnfjörð Bjarmason, Nov 22, 2018
  68. 01/10 commit-graph: rename 'num_extra_edges' variable to 'num_large_edges'Ævar Arnfjörð Bjarmason, Nov 22, 2018
  69. 0/9 commit-graph write: progress output improvementsÆvar Arnfjörð Bjarmason, Jan 16, 2019
  70. Junio C HamanoJan 19, 2019
  71. 00/10 commit-graph write: progress output improvementsÆvar Arnfjörð Bjarmason, Jan 19, 2019
  72. Derrick StoleeJan 22, 2019
  73. Junio C HamanoJan 23, 2019
  74. Junio C HamanoJan 22, 2019
  75. 01/10 commit-graph write: use pack order when finding commitsÆvar Arnfjörð Bjarmason, Jan 19, 2019
  76. 02/10 commit-graph: rename "large edges" to "extra edges"Ævar Arnfjörð Bjarmason, Jan 19, 2019
  77. 03/10 commit-graph: don't call write_graph_chunk_large_edges() unnecessarilyÆvar Arnfjörð Bjarmason, Jan 19, 2019
  78. 03/10 commit-graph: don't call write_graph_chunk_extra_edges() unnecessarilySZEDER Gábor, Jan 23, 2019
  79. 04/10 commit-graph write: add "Writing out" progress outputÆvar Arnfjörð Bjarmason, Jan 19, 2019
  80. 05/10 commit-graph write: more descriptive "writing out" outputÆvar Arnfjörð Bjarmason, Jan 19, 2019
  81. 06/10 commit-graph write: show progress for object searchÆvar Arnfjörð Bjarmason, Jan 19, 2019
  82. 08/10 commit-graph write: remove empty line for readabilityÆvar Arnfjörð Bjarmason, Jan 19, 2019
  83. 07/10 commit-graph write: add more descriptive progress outputÆvar Arnfjörð Bjarmason, Jan 19, 2019
  84. 09/10 commit-graph write: add itermediate progressÆvar Arnfjörð Bjarmason, Jan 19, 2019
  85. 10/10 commit-graph write: emit a percentage for all progressÆvar Arnfjörð Bjarmason, Jan 19, 2019
  86. commit-graph: don't show progress percentages while expanding reachable commitsSZEDER Gábor, Mar 22, 2019
  87. Ævar Arnfjörð BjarmasonMar 22, 2019
  88. SZEDER GáborMar 22, 2019
  89. Ævar Arnfjörð BjarmasonMar 22, 2019
  90. Ævar Arnfjörð BjarmasonMar 22, 2019
  91. SZEDER GáborMar 22, 2019
  92. Ævar Arnfjörð BjarmasonMar 22, 2019
  93. SZEDER GáborMar 22, 2019
  94. SZEDER GáborMar 22, 2019
  95. Ævar Arnfjörð BjarmasonMar 22, 2019
  96. 1/9 commit-graph: rename 'num_extra_edges' variable to 'num_large_edges'Ævar Arnfjörð Bjarmason, Jan 16, 2019
  97. 2/9 commit-graph: don't call write_graph_chunk_large_edges() unnecessarilyÆvar Arnfjörð Bjarmason, Jan 16, 2019
  98. 3/9 commit-graph write: add "Writing out" progress outputÆvar Arnfjörð Bjarmason, Jan 16, 2019
  99. SZEDER GáborJan 18, 2019
  100. 4/9 commit-graph write: more descriptive "writing out" outputÆvar Arnfjörð Bjarmason, Jan 16, 2019
  101. 5/9 commit-graph write: show progress for object searchÆvar Arnfjörð Bjarmason, Jan 16, 2019
  102. 6/9 commit-graph write: add more descriptive progress outputÆvar Arnfjörð Bjarmason, Jan 16, 2019
  103. 7/9 commit-graph write: remove empty line for readabilityÆvar Arnfjörð Bjarmason, Jan 16, 2019
  104. 8/9 commit-graph write: add itermediate progressÆvar Arnfjörð Bjarmason, Jan 16, 2019
  105. 9/9 commit-graph write: emit a percentage for all progressÆvar Arnfjörð Bjarmason, Jan 16, 2019
  106. commit-graph write: use pack order when finding commitsÆvar Arnfjörð Bjarmason, Jan 17, 2019
  107. Derrick StoleeJan 17, 2019
  108. Derrick StoleeJan 17, 2019
  109. 02/10 commit-graph: don't call write_graph_chunk_large_edges() unnecessarilyÆvar Arnfjörð Bjarmason, Nov 22, 2018
  110. 03/10 commit-graph write: rephrase confusing progress outputÆvar Arnfjörð Bjarmason, Nov 22, 2018
  111. 05/10 commit-graph write: more descriptive "writing out" outputÆvar Arnfjörð Bjarmason, Nov 22, 2018
  112. 04/10 commit-graph write: add "Writing out" progress outputÆvar Arnfjörð Bjarmason, Nov 22, 2018
  113. 06/10 commit-graph write: show progress for object searchÆvar Arnfjörð Bjarmason, Nov 22, 2018
  114. 07/10 commit-graph write: add more descriptive progress outputÆvar Arnfjörð Bjarmason, Nov 22, 2018
  115. 08/10 commit-graph write: remove empty line for readabilityÆvar Arnfjörð Bjarmason, Nov 22, 2018
  116. 09/10 commit-graph write: add itermediate progressÆvar Arnfjörð Bjarmason, Nov 22, 2018
  117. 10/10 commit-graph write: emit a percentage for all progressÆvar Arnfjörð Bjarmason, Nov 22, 2018
  118. Eric SunshineNov 22, 2018
  119. 01/10 commit-graph: rename 'num_extra_edges' variable to 'num_large_edges'Ævar Arnfjörð Bjarmason, Nov 22, 2018
  120. 03/10 commit-graph write: rephrase confusing progress outputÆvar Arnfjörð Bjarmason, Nov 22, 2018
  121. 02/10 commit-graph: don't call write_graph_chunk_large_edges() unnecessarilyÆvar Arnfjörð Bjarmason, Nov 22, 2018
  122. 04/10 commit-graph write: add "Writing out" progress outputÆvar Arnfjörð Bjarmason, Nov 22, 2018
  123. 05/10 commit-graph write: more descriptive "writing out" outputÆvar Arnfjörð Bjarmason, Nov 22, 2018
  124. 06/10 commit-graph write: show progress for object searchÆvar Arnfjörð Bjarmason, Nov 22, 2018
  125. 07/10 commit-graph write: add more descriptive progress outputÆvar Arnfjörð Bjarmason, Nov 22, 2018
  126. 08/10 commit-graph write: remove empty line for readabilityÆvar Arnfjörð Bjarmason, Nov 22, 2018
  127. 09/10 commit-graph write: add itermediate progressÆvar Arnfjörð Bjarmason, Nov 22, 2018
  128. 10/10 commit-graph write: emit a percentage for all progressÆvar Arnfjörð Bjarmason, Nov 22, 2018
  129. 3/6 commit-graph write: show progress for object searchÆvar Arnfjörð Bjarmason, Nov 20, 2018
  130. 4/6 commit-graph write: add more describing progress outputÆvar Arnfjörð Bjarmason, Nov 20, 2018
  131. 5/6 commit-graph write: remove empty line for readabilityÆvar Arnfjörð Bjarmason, Nov 20, 2018
  132. 6/6 commit-graph write: add even more progress outputÆvar Arnfjörð Bjarmason, Nov 20, 2018
  133. 2/2 commit-graph verify: add progress outputÆvar Arnfjörð Bjarmason, Sep 17, 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.