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

Re: [FEATURE REQUEST] Filter-branch extend progress with a simple estimated time remaning

From
Gabor Bernat <bernat@primeranks.net>
Date
Aug 30, 2015, 16:58 UTC
Message-ID
<CANy2qHf-HcJVyqo83y0+CtVnNp9TzHC479Lzu+NbpCF9k=8g1A@mail.gmail.com>
In-Reply-To
<xmqqd1y4zpjx.fsf@gitster.mtv.corp.google.com>

I would argue against the every n commit check, or at least making it configurable, as in my case the speed is something between 0.01 and 1.5 seconds per commit. Checking it every n commit would make it I feel quite slow to adapt. But it's debatable.

On 8/30/15, Junio C Hamano <gitster@pobox.com> wrote:
Show 38 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>>>> Most portable likely would be Perl, however, that's probably too
>>>> heavyweight inside a loop like this, even if called only once each N
>>>> iterations.
>
> I think that is true.  Now, when it is too heavy to spawn perl,
> would it be light enough to spawn awk, I have to wonder.  Even if
> the implementation uses awk, I think the time measurement should be
> done only once each N iterations (e.g. every 1000 commits measure
> the rate and divide the remaining commits with that rate while
> displaying the progress; if you are chewing 100 commits per minute
> and have 2000 commits to go, you know it will take 20 more minutes).
>
>>> http://stackoverflow.com/questions/2445198/get-seconds-since-epoch-in-any-posix-compliant-shell
>>> Found this,
>>>
>>> awk 'BEGIN{srand();print srand()}'
>>>
>>> srand() in awk returns the previous seed value, and calling it without
>>> an argument sets it to time of day, so the above sequence should
>>> return seconds since the epoch, or at least something in seconds that
>>> is relative to a fixed point which is all that's needed in this
>>> thread.
>
> In practice this should work, but it makes me feel somewhat uneasy.
>
> POSIX says "Set the seed value for rand to expr or use the time of
> day if expr is omitted. The previous seed value shall be returned."
> but I do not see anything that says that "the time of day" is
> counted in seconds around there (which is the crucial bit for this
> application).
>
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html
> (4.15 Seconds since the Epoch) says "The relationship between the
> actual time of day and the current value for seconds since the Epoch
> is unspecified."
>
-- 
 Bernát Gábor
Student -  Budapest University of Technology and Economics - Computer
Engineering, M.Sc. - Budapest, Hungary
System Integrator - Gravity R&D | Rock Solid Recommendations - Budapest
office | 5-7 Expo ter | H-1101 | Budapest | Hungary
Previous: Junio C HamanoNext: Mikael Magnusson
Message 19 of 24 in “[FEATURE REQUEST] Filter-branch extend progress with a simple estimated time remaning”
  1. Gabor BernatAug 25, 2015
  2. Jeff KingAug 25, 2015
  3. Junio C HamanoAug 25, 2015
  4. Jeff KingAug 25, 2015
  5. Jeff KingAug 25, 2015
  6. Gabor BernatAug 25, 2015
  7. Eric SunshineAug 25, 2015
  8. Jeff KingAug 26, 2015
  9. Gabor BernatAug 29, 2015
  10. Gabor BernatAug 29, 2015
  11. Eric SunshineAug 30, 2015
  12. Gabor BernatAug 30, 2015
  13. Eric SunshineAug 30, 2015
  14. Mikael MagnussonAug 30, 2015
  15. Gabor BernatAug 30, 2015
  16. Mikael MagnussonAug 30, 2015
  17. Eric SunshineAug 30, 2015
  18. Junio C HamanoAug 30, 2015
  19. Gabor BernatAug 30, 2015
  20. Mikael MagnussonAug 30, 2015
  21. Eric SunshineAug 30, 2015
  22. Eric SunshineAug 30, 2015
  23. Eric SunshineAug 30, 2015
  24. Junio C HamanoAug 31, 2015

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.