Re: [Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread alexander golks
Am Mon, 8 Apr 2019 16:02:10 +
schrieb "Murphy, Sean" :

> > I would just show one progress set to 3 * raw count.  Each stage
> > periodically signals to the ui thread its progress, and whether it has
> > processed the end-of-data signal from the previous stage.  In the ui
> > thread slot:
> > 
> > int totalCount, rawCount;
> > 
> > QVector stageProgress;
> > 
> > void stageProgressSlot(int stageIndex, int count, bool completed) {
> > 
> >      Q_ASSERT(count <= rawCount);
> > 
> >      auto thisCount = (if completed ? rawCount : count);
> > 
> >      Q_ASSERT(thisCount >= stageProgress[stageIndex]);
> > 
> >      totalCount += thisCount - stageProgress[stageIndex];
> > 
> >      stageProgress[stageIndex] = thisCount;
> > 
> >      ui->progress->setValue(totalCount);
> > 
> > }
> > 
> > It will always appear to start slowly then jump forward depending on the
> > degree of filtering.  I can't see a way to avoid that other than Bill's
> > idea.
> > 
> > Hope that helps,  Tony  
> 
> I think it does, thank you. I can't really see any other way to do it to 
> provide a somewhat meaningful progress bar - I'd like to avoid the
> "busy" progress bar if possible since that doesn't offer the user any sort
> of sense of how much longer they have to wait and your idea at least
> gives them some sense of status, even if it's not 100% accurate at all times.
> 
> Sean

what about 2 progress bars? one for the count of filter processes, and the 
other for the steps at each process?
i use this when loading several files (your filter processes) and display the 
current line in a file (your steps).

-- 
/*
 *printk(KERN_ERR "Danger Will Robinson: failed to re-trigger IRQ%d\n", irq);
 *linux-2.6.6/arch/arm/common/sa.c
 */


pgpK1HwGeq1gQ.pgp
Description: Digitale Signatur von OpenPGP
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread Konstantin Tokarev
  08.04.2019, 16:16, "Murphy, Sean" :> We have a data processing pipeline that looks like so:> Raw Data objects -> Type "A" data objects -> Type "B" data objects -> Final Data objects>> Each step can be considered a filtering process where the following mathematical relationship holds for the quantities of each type of object:> Raw count >= A count >= B count >= Final count> Technically all of those quantity relationships can be >=, but in practice they almost never equal, the left hand side is almost always greater than right hand side, but it's technically possible that some could be equal with the right input data.>>  So the issue I'm having here is that I want to show the user some sort of progress indicator (this whole pipeline takes a bit of time), but at the start I only know the raw count, not any of the intermediate or final counts. And because the A->B->Final portion of the pipeline takes a noticeable amount of time, I can't just run the progress bar from 0 to Raw count, because then from the user's standpoint the progress bar would reach 100% once the number of raw samples is exhausted, not when processing is fully complete.>> Is my only strategy to use the "undetermined state" of QProgress bar to just show "something" is happening, but not how far along we are in the process? To make the issue even a little more complicated, each processing node is running in a separate thread, so these conversions are happening in parallel as much as possible, making tracking a little more difficult. For example, at any given point in time, the node that converts type A objects to B objects, might be empty. It may have processed all of the A objects it has received into all the B objects it can make and passed them on to the next node, while the node ahead of it might not have finished its work on the next chunk of raw data to emit the next A object. So at that instant in time, the A->B node thinks it's "done" until it receives the next A object at some time later. Assuming that the main chunk of work is done on A->B step, you can increment progress bar when each thread is started and finished, plus fixed amounts of progress for the first and the last step. Approximate thread number as 2*Raw when it starts, and when amount is known, adjust progress bar settings accordingly.  -- Regards,Konstantin ___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread Murphy, Sean
> I would just show one progress set to 3 * raw count.  Each stage
> periodically signals to the ui thread its progress, and whether it has
> processed the end-of-data signal from the previous stage.  In the ui
> thread slot:
> 
> int totalCount, rawCount;
> 
> QVector stageProgress;
> 
> void stageProgressSlot(int stageIndex, int count, bool completed) {
> 
>      Q_ASSERT(count <= rawCount);
> 
>      auto thisCount = (if completed ? rawCount : count);
> 
>      Q_ASSERT(thisCount >= stageProgress[stageIndex]);
> 
>      totalCount += thisCount - stageProgress[stageIndex];
> 
>      stageProgress[stageIndex] = thisCount;
> 
>      ui->progress->setValue(totalCount);
> 
> }
> 
> It will always appear to start slowly then jump forward depending on the
> degree of filtering.  I can't see a way to avoid that other than Bill's
> idea.
> 
> Hope that helps,  Tony

I think it does, thank you. I can't really see any other way to do it to 
provide a somewhat meaningful progress bar - I'd like to avoid the
"busy" progress bar if possible since that doesn't offer the user any sort
of sense of how much longer they have to wait and your idea at least
gives them some sense of status, even if it's not 100% accurate at all times.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread Igor Mironchik

Hi,

Have a look at Qt Maintenance Tool download meta information progress bar...

On 08.04.2019 18:04, Tony Rietwyk wrote:

Hi Sean,

I would just show one progress set to 3 * raw count.  Each stage 
periodically signals to the ui thread its progress, and whether it has 
processed the end-of-data signal from the previous stage.  In the ui 
thread slot:


int totalCount, rawCount;

QVector stageProgress;

void stageProgressSlot(int stageIndex, int count, bool completed) {

    Q_ASSERT(count <= rawCount);

    auto thisCount = (if completed ? rawCount : count);

    Q_ASSERT(thisCount >= stageProgress[stageIndex]);

    totalCount += thisCount - stageProgress[stageIndex];

    stageProgress[stageIndex] = thisCount;

    ui->progress->setValue(totalCount);

}

It will always appear to start slowly then jump forward depending on 
the degree of filtering.  I can't see a way to avoid that other than 
Bill's idea.


Hope that helps,  Tony


On 9/04/2019 12:16 am, william.croc...@analog.com wrote:




  So the issue I'm having here is that I want to show the user some 
sort of progress indicator (this whole pipeline takes a bit of 
time), but at the start I only know the raw count, not any of the 
intermediate or final counts. And because the A->B->Final portion of 
the pipeline takes a noticeable amount of time, I can't just run the 
progress bar from 0 to Raw count, because then from the user's 
standpoint the progress bar would reach 100% once the number of raw 
samples is exhausted, not when processing is fully complete.




You could show three progress bars, one for each stage.
Assume each item will pass through each stage (which is pessimistic)
and show progress based on that. In most cases the whole
process will finish early based on the bars, but progress
will be shown.

Bill
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread Tony Rietwyk

Hi Sean,

I would just show one progress set to 3 * raw count.  Each stage 
periodically signals to the ui thread its progress, and whether it has 
processed the end-of-data signal from the previous stage.  In the ui 
thread slot:


int totalCount, rawCount;

QVector stageProgress;

void stageProgressSlot(int stageIndex, int count, bool completed) {

    Q_ASSERT(count <= rawCount);

    auto thisCount = (if completed ? rawCount : count);

    Q_ASSERT(thisCount >= stageProgress[stageIndex]);

    totalCount += thisCount - stageProgress[stageIndex];

    stageProgress[stageIndex] = thisCount;

    ui->progress->setValue(totalCount);

}

It will always appear to start slowly then jump forward depending on the 
degree of filtering.  I can't see a way to avoid that other than Bill's 
idea.


Hope that helps,  Tony


On 9/04/2019 12:16 am, william.croc...@analog.com wrote:




  So the issue I'm having here is that I want to show the user some 
sort of progress indicator (this whole pipeline takes a bit of time), 
but at the start I only know the raw count, not any of the 
intermediate or final counts. And because the A->B->Final portion of 
the pipeline takes a noticeable amount of time, I can't just run the 
progress bar from 0 to Raw count, because then from the user's 
standpoint the progress bar would reach 100% once the number of raw 
samples is exhausted, not when processing is fully complete.




You could show three progress bars, one for each stage.
Assume each item will pass through each stage (which is pessimistic)
and show progress based on that. In most cases the whole
process will finish early based on the bars, but progress
will be shown.

Bill
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread william.croc...@analog.com




  So the issue I'm having here is that I want to show the user some sort of progress 
indicator (this whole pipeline takes a bit of time), but at the start I only know the 
raw count, not any of the intermediate or final counts. And because the 
A->B->Final portion of the pipeline takes a noticeable amount of time, I can't 
just run the progress bar from 0 to Raw count, because then from the user's 
standpoint the progress bar would reach 100% once the number of raw samples is 
exhausted, not when processing is fully complete.



You could show three progress bars, one for each stage.
Assume each item will pass through each stage (which is pessimistic)
and show progress based on that. In most cases the whole
process will finish early based on the bars, but progress
will be shown.

Bill
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread william.croc...@analog.com




We have a data processing pipeline that looks like so:
 Raw Data objects -> Type "A" data objects -> Type "B" data objects -> 
Final Data objects

Each step can be considered a filtering process where the following 
mathematical relationship holds for the quantities of each type of object:
 Raw count >= A count >= B count >= Final count
Technically all of those quantity relationships can be >=, but in practice they 
almost never equal, the left hand side is almost always greater than right hand 
side, but it's technically possible that some could be equal with the right input 
data.

  So the issue I'm having here is that I want to show the user some sort of 
progress indicator (this whole pipeline takes a bit of time), but at the start 
I only know the raw count, not any of the intermediate or final counts.


You can do what Microsoft does when copying files from one place to another, for 
example...

Take an unreasonable amount of additional time to study the problem
for the sole purposes of presenting an approximate progress bar.

:-)

Bill
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread Murphy, Sean
We have a data processing pipeline that looks like so:
Raw Data objects -> Type "A" data objects -> Type "B" data objects -> Final 
Data objects

Each step can be considered a filtering process where the following 
mathematical relationship holds for the quantities of each type of object:
Raw count >= A count >= B count >= Final count
Technically all of those quantity relationships can be >=, but in practice they 
almost never equal, the left hand side is almost always greater than right hand 
side, but it's technically possible that some could be equal with the right 
input data.

 So the issue I'm having here is that I want to show the user some sort of 
progress indicator (this whole pipeline takes a bit of time), but at the start 
I only know the raw count, not any of the intermediate or final counts. And 
because the A->B->Final portion of the pipeline takes a noticeable amount of 
time, I can't just run the progress bar from 0 to Raw count, because then from 
the user's standpoint the progress bar would reach 100% once the number of raw 
samples is exhausted, not when processing is fully complete.

Is my only strategy to use the "undetermined state" of QProgress bar to just 
show "something" is happening, but not how far along we are in the process? To 
make the issue even a little more complicated, each processing node is running 
in a separate thread, so these conversions are happening in parallel as much as 
possible, making tracking a little more difficult. For example, at any given 
point in time, the node that converts type A objects to B objects, might be 
empty. It may have processed all of the A objects it has received into all the 
B objects it can make and passed them on to the next node, while the node ahead 
of it might not have finished its work on the next chunk of raw data to emit 
the next A object. So at that instant in time, the A->B node thinks it's "done" 
until it receives the next A object at some time later.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest