Menu

#693 'progress' is kind of jumpy

v1.1.x
fixed
v1.1.3
Bug Fix
2022-08-05
2022-04-06
Erik Hänel
No

The command progress may show a simple progress bar within the terminal. Compared to the percentage values (which step with *0,*2,*5,*7,*0) the bar itself seems to step with *0,*5,*0 although enough bar elements are available to follow the value stepping.

Analysis:

The issue only occurs, if the progress bar is defined to cover a small iteration range. In this case, the value to be displayed by the progress bar is calculated using integer division and therefore truncates to *0 and *5. Change this to use the actual ratio.

Implementation:

  • Implementation: Implemented as discussed in the analysis.
  • Revision: [r1135]
  • Implementation test: Small and large iteration ranges were tested and the bar was not jumpy anymore.

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [ ] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [x] not needed
  • Language files:
    • [ ] corresponding language files updated
    • [x] not needed

Tests:

Tested manually. No deviations detected.

Related

Commit: [r1135]

Discussion

  • Erik Hänel

    Erik Hänel - 2022-04-27
    • labels: --> internal, cmd
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2022-04-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     The command `progress` may show a simple progress bar within the terminal. Compared to the percentage values (which step with `*0,*2,*5,*7,*0`) the bar itself seems to step with `*0,*5*0` although enough bar elements are available to follow the value stepping.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2022-05-03
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
    -The command `progress` may show a simple progress bar within the terminal. Compared to the percentage values (which step with `*0,*2,*5,*7,*0`) the bar itself seems to step with `*0,*5*0` although enough bar elements are available to follow the value stepping.
    +The command `progress` may show a simple progress bar within the terminal. Compared to the percentage values (which step with `*0,*2,*5,*7,*0`) the bar itself seems to step with `*0,*5,*0` although enough bar elements are available to follow the value stepping.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +The issue only occurs, if the progress bar is defined to cover a small iteration range. In this case, the value to be displayed by the progress bar is calculated using integer division and therefore truncates to `*0` and `*5`. Change this to use the actual ratio. 
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2022-05-03
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,20 +4,20 @@
     The issue only occurs, if the progress bar is defined to cover a small iteration range. In this case, the value to be displayed by the progress bar is calculated using integer division and therefore truncates to `*0` and `*5`. Change this to use the actual ratio. 
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Implemented as discussed in the analysis.
    +* Revision: [r1135]
    +* Implementation test: Small and large iteration ranges were tested and the bar was not jumpy anymore.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
         * [ ] corresponding documentation articles updated
         * [ ] new documentation articles created
    -    * [ ] not needed
    +    * [x] not needed
     * **Language files:**
         * [ ] corresponding language files updated
    -    * [ ] not needed
    +    * [x] not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r1135]

  • Erik Hänel

    Erik Hänel - 2022-08-05
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,4 +20,4 @@
    
         * [x] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Tested manually. No deviations detected.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel