qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Brad Hards <bradh@frogmouth.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()
Date: Fri, 06 May 2011 13:11:56 +0200	[thread overview]
Message-ID: <4DC3D77C.4030703@redhat.com> (raw)
In-Reply-To: <201105062040.00128.bradh@frogmouth.net>

On 05/06/11 12:40, Brad Hards wrote:
> On Fri, 6 May 2011 07:39:10 PM Jes.Sorensen@redhat.com wrote:
>> +/*
>> + * Add delta to current state, and print the output if the current
>> + * state has progressed more than min_skip since the last value was
>> + * printed. 'max' specifies the relative percentage, ie. a function
>> + * can count for 30% of the total work, and still count from 0-100, by
>> + * setting max to 30. If max is set to zero, the percent argument
>> + * becomes an absolute value for current state.
>> + */
>>  void qemu_progress_print(float percent, int max)
> I hate to critique anyone adding docs, but this makes no sense at all to me 
> without reading the code. Is "percent" the amount we are adding (i.e. the 
> delta) or the result (i.e. absolute progress)? Or does it vary according to 
> the value of max?

What you add is a delta, which is relative to the max. We can change the
argument name of the function to be delta instead if that makes it
easier to follow.

Cheers,
Jes

  reply	other threads:[~2011-05-06 11:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06  9:39 [Qemu-devel] [PATCH qemu-block 0/2] cleanup progress code Jes.Sorensen
2011-05-06  9:39 ` [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print() Jes.Sorensen
2011-05-06 10:40   ` Brad Hards
2011-05-06 11:11     ` Jes Sorensen [this message]
2011-05-06 15:10       ` Markus Armbruster
2011-05-09 13:15         ` Jes Sorensen
2011-05-09 13:31           ` Markus Armbruster
2011-05-12 15:04         ` Avi Kivity
2011-05-06  9:39 ` [Qemu-devel] [PATCH 2/2] qemu-img.c: Remove superfluous parenthesis Jes.Sorensen
2011-05-06 10:46 ` [Qemu-devel] [PATCH qemu-block 0/2] cleanup progress code Markus Armbruster

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=4DC3D77C.4030703@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=bradh@frogmouth.net \
    --cc=qemu-devel@nongnu.org \
    /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 NNTP newsgroup(s).