public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Patrick Monnerat <patrick@monnerat.net>
To: Aaron Merey <amerey@redhat.com>
Cc: gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH v3] gdb: Improve debuginfod progress updates
Date: Wed, 16 Feb 2022 11:38:35 +0100	[thread overview]
Message-ID: <5e6194e4-3a83-e169-0c9a-5858c993bf59@monnerat.net> (raw)
In-Reply-To: <CAJDtP-Qa=q6x6qTc3-7rknJgtE89RTTtp58-b7yeYAyn1fEHFg@mail.gmail.com>

Hi Aaron,

On 2/16/22 03:09, Aaron Merey wrote:
> Thanks for taking another look.
You're welcome.
>>> +      /* Transfer size is known.  */
>>> +      double percent = (double)cur / (double)total;
>> The variable name is confusing as it is <= 1.0.
> update_progress_percent uses the name "howmuch" for this.  It would be
> better if "howmuch" was used here too.
Good choice.
>>> +      if (percent >= 0.0 && percent <= 1.0)
>> I don't think this test is needed: cur and total are obtained
>> (indirectly) from curl and IMHO you can trust it.
> I've experienced at least one case where percent was > 1.0.  I haven't
> been able to reproduce it because it seemed to coincide with a network
> hiccup.
Very strange! TCP is supposed to guarantee no duplicate data reception. 
If this really occurs, debuginfo data are probably corrupted too!
> +     progress_update object.  */
> +  void update_progress_bar (double howmuch)
>> This is never called! why do you provide both PERCENT and (unused) BAR?
>> This is a bit confusing.
> The progress update message originally included the bar but I now want to
> only print messages that fit entirely on one line.  This makes it possible
> to rewrite an entire message with transfer size information once it becomes
> available.  Because the progress bar was already implemented I figured I'd
> leave it in case it ends up serving a purpose in the future.
Thanks for this precision. Maybe put it in a comment?


Cheers,

Patrick


  reply	other threads:[~2022-02-16 10:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26  0:58 [PATCH v2] gdb/debuginfod: Rework " Aaron Merey
2022-02-09  2:25 ` [PATCH v3] gdb: Improve debuginfod " Aaron Merey
2022-02-14  0:56   ` Patrick Monnerat
2022-02-16  2:09     ` Aaron Merey
2022-02-16 10:38       ` Patrick Monnerat [this message]
2022-02-17 16:06         ` Aaron Merey
2022-03-04 18:15   ` Tom Tromey
2022-03-09  1:26     ` Aaron Merey
2022-03-18 19:23       ` Tom Tromey
2022-03-22  0:27         ` Aaron Merey
2022-04-07 14:54           ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e6194e4-3a83-e169-0c9a-5858c993bf59@monnerat.net \
    --to=patrick@monnerat.net \
    --cc=amerey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).