All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Paul Eggleton <paul.eggleton@linux.intel.com>,
	bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 10/10] runqueue: report progress for "Preparing RunQueue" step
Date: Mon, 13 Jun 2016 12:09:33 +0100	[thread overview]
Message-ID: <1465816173.13979.204.camel@linuxfoundation.org> (raw)
In-Reply-To: <ea0b3c1b34818a2eb5f0beb998a4c4e63f334b19.1465786269.git.paul.eggleton@linux.intel.com>

On Mon, 2016-06-13 at 14:52 +1200, Paul Eggleton wrote:
> @@ -1119,14 +1150,19 @@ class RunQueue:
>  
>          if self.state is runQueuePrepare:
>              self.rqexe = RunQueueExecuteDummy(self)
> +            self.rqdata.init_progress_reporter = bb.progress.MultiStageProcessProgressReporter(self.cooker.data,
> +                                                            "Initialising tasks",
> +                                                            [27, 870, 3, 33, 1, 3, 3, 2, 3, 6, 1, 13, 1, 1, 132, 32, 1, 61, 1, 13, 2, 243, 151, 299, 81, 1, 15, 72])
>              if self.rqdata.prepare() == 0:
>                  self.state = runQueueComplete
>              else:
>                  self.state = runQueueSceneInit
> +                self.rqdata.init_progress_reporter.next_stage()
>  

I appreciate the difficulty in figuring some of this out and the
changes look quite neat on the most part. I am however very worried by
the above from a code maintenance standpoint.

If for example I add or remove a step in runqueue, how do I know where
in this array to make a change? How do I calculate what the new
weighting should be?

I did wonder if next_stage() should pass the number instead, that way
at least the call site would be clearer. It doesn't solve the problem
of knowing how many steps there are, or what these weights mean or how
to recalculate them in the future.

Any thoughts on that?

Cheers,

Richard




  reply	other threads:[~2016-06-13 11:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13  2:52 [PATCH 00/10] Support progress reporting Paul Eggleton
2016-06-13  2:52 ` [PATCH 01/10] knotty: provide a symlink to the latest console log Paul Eggleton
2016-06-13  2:52 ` [PATCH 02/10] knotty: import latest python-progressbar Paul Eggleton
2016-06-13  2:52 ` [PATCH 03/10] lib: implement basic task progress support Paul Eggleton
2016-06-13  2:52 ` [PATCH 04/10] lib/bb/progress: add MultiStageProgressReporter Paul Eggleton
2016-06-13  2:52 ` [PATCH 05/10] fetch2: implement progress support Paul Eggleton
2016-06-28 10:23   ` Burton, Ross
2016-06-28 10:33     ` Paul Eggleton
2016-06-13  2:52 ` [PATCH 06/10] knotty: add code to support showing progress for sstate object querying Paul Eggleton
2016-06-13  2:52 ` [PATCH 07/10] knotty: show task progress bar Paul Eggleton
2016-06-13  2:52 ` [PATCH 08/10] knotty: add quiet output mode Paul Eggleton
2016-06-13  2:52 ` [PATCH 09/10] runqueue: add ability to enforce that tasks are setscened Paul Eggleton
2016-06-13  2:52 ` [PATCH 10/10] runqueue: report progress for "Preparing RunQueue" step Paul Eggleton
2016-06-13 11:09   ` Richard Purdie [this message]
2016-06-13 12:16     ` Paul Eggleton
2016-06-15 21:46       ` Richard Purdie
2016-06-15 21:49         ` Paul Eggleton

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=1465816173.13979.204.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.