[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] [bug #35456] The progress bar for STK500V2 programmer is "
From: |
Roger Wolff |
Subject: |
[avrdude-dev] [bug #35456] The progress bar for STK500V2 programmer is "wrong". |
Date: |
Fri, 13 Sep 2013 09:22:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0 |
Follow-up Comment #5, bug #35456 (project avrdude):
IMHO, what the user wants is an indication of how much longer he has to wait
("should I go get a cup of coffee?"). That's the idea of a progress bar. By
progressing slowly to 5% and then jumping to the end, you lose resolution,
even if you'd tell the user in advance that that's what's going to happen.
In the case of an "FSCK" you have different phases of the progress. So a
developer fsck's his filesystem, concludes that phase 1 takes 50% of the time
and phase 2-6 each take about 10%. So then the progress bar is programmed to
show .5*completion-of-phase-1 or
.5+.1*(phase-2)+.1*completion-of-current-phase.
That gets you a reasonable progress bar. And people understand that this
cannot be perfect. A filesystem with millions of files may spend much more of
it's time in say "phase two". So this is a difficult case.
But with avrdude, I'd say that programming time is roughly proportional to the
bytes that need to be programmed. So, scanning the datafile for the bytes that
need to be programmed is relatively easy and quick. And then you can set the
progress bar at
bytes-programmed-so-far/total-bytes-that-need-to-be-programmed.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?35456>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/