Skip to content

Commit

Permalink
fix: correct percentage calculation
Browse files Browse the repository at this point in the history
resolves #6866
  • Loading branch information
jeremylong committed Jul 23, 2024
1 parent 5971e2e commit 12be29e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,9 @@ private boolean processApi() throws UpdateException {
}
ctr += 1;
if ((ctr % 5) == 0) {
final double percent = (double) (ctr * RESULTS_PER_PAGE) / max * 100;
LOGGER.info(String.format("Downloaded %,d/%,d (%.0f%%)", ctr * RESULTS_PER_PAGE, max, percent));
//TODO get results per page from the API as it could adjust automatically
final double percent = (double) (ctr * resultsPerPage) / max * 100;
LOGGER.info(String.format("Downloaded %,d/%,d (%.0f%%)", ctr * resultsPerPage, max, percent));
}
}
final ZonedDateTime last = api.getLastUpdated();
Expand Down

0 comments on commit 12be29e

Please sign in to comment.