Incorrect progress reporting in asynchronous WPS when process has Complex input and output

Description

When wps has complex output like;
public class MyCustomOutput
{
String val1;
String val2;
....
}

Execution cost of serializing wps output calculated as 50% of the process execution time at;
org.geoserver.wps.executor.WPSExecutionManager class execute() method

int inputsLongSteps = inputs.longStepCount();
int longSteps = inputsLongSteps + 1;
if (hasComplexOutputs()) {
longSteps++;
}
float longStepPercentage = 98f / longSteps;
....
float outputPercentage = (hasComplexOutputs() ? longStepPercentage : 0) + 1;

In WPS code reporting ProgressListener.progress(80); WPS clients will see 40% progress in their GetExecutionStatus requests in the same time.

Possible fix : Calculating longStepPercentage like
float longStepPercentage = longSteps * 3f;
can make WPS clients to see more accurate progress of the service.

Environment

Windows

Status

Assignee

Unassigned

Reporter

Mert ─░skender

Triage

Fix versions

None

Affects versions

Priority

Medium
Configure