Project

General

Profile

bug #6086

Percentage value in ProgressMonitor accuratly rounded

Added by Andreas Kohlbecker about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
New
Category:
cdmlib
Target version:
Start date:
09/15/2016
Due date:
% Done:

0%

Severity:
normal
Found in Version:

Description

The percentage value on the progress of the indexing process is often reported as 99,99% when the job is completet.
The commit commit:cdm|1ec5d31 (better percentage values from Progressmonitor) should fix that but the problem is not fully solved.

a.muller wote:

beim Indexieren könnte man auch folgendes noch runden: indexing DescriptionElementBase [chunk 3.168351341931038/6]

Ausserdem ist das Endergebnis immer noch nicht immer 100%, sondern diesmal z.B. 100.01%. Math.ceil ist noch nicht ganz die richtige Funktion.

Ich verwende ja in letzter Zeit immer mehr BigDecimal, da ist das viel klarer definiert. Vielleicht sollten wir den ProgressMonitor mal diesbezöglich anpassen.

Associated revisions

Revision 6f59693f (diff)
Added by Andreas Müller about 3 years ago

rel #6086 Improve rounding for progress monitor

  • fix error in rounding by using round not ceil
  • add method for user defined scaled rounding

Revision 3273ef7c (diff)
Added by Andreas Müller about 3 years ago

ref #6086 fix failing test

Revision d74b5cdc (diff)
Added by Andreas Kohlbecker about 3 years ago

ref #6086 solving the problems in the java-script of the web application monitor widget:
- chunk information: number rounded and label renamed
- Percentage number rounding fixed

Revision d178ecb9 (diff)
Added by Andreas Müller almost 3 years ago

ref #6086 fix failing test

Revision 84bb1d2c (diff)
Added by Andreas Kohlbecker almost 3 years ago

ref #6086 solving the problems in the java-script of the web application monitor widget:
- chunk information: number rounded and label renamed
- Percentage number rounding fixed

History

#1 Updated by Andreas Müller about 3 years ago

Ceil is not the correct method, use round instead, otherwise the result is only rounded into one direction.

#2 Updated by Andreas Müller about 3 years ago

  • Category changed from cdm to cdmlib

Experience shows (see class DefaultProgressMonitorTest) that rounding errors mostly appear when SubProgressMonitors are in use due to the intermediate results stored in "workDone".

To avoid this I kept the rounding but with more digits (5).

Also I added a new method that allows user defined rounding using BigDecimal and scaling.

cdmlib|6f5969

#3 Updated by Andreas Müller about 3 years ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • Target version changed from Unassigned CDM tickets to Release 4.3

Can you please check if this fixes the problem?

#4 Updated by Andreas Kohlbecker about 3 years ago

  • Status changed from New to Closed

This seems to be fully solved.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)