Skip to content

Capped percent complete in monitor.c#825

Merged
zakird merged 7 commits intomainfrom
phillip/823
Mar 16, 2024
Merged

Capped percent complete in monitor.c#825
zakird merged 7 commits intomainfrom
phillip/823

Conversation

@phillip-stephens
Copy link
Contributor

@phillip-stephens phillip-stephens commented Mar 15, 2024

Resolves #823

Saw with an assert that sometimes, the remaining_secs was < 0, causing our % remaining calculation to go over 100.

Mar 15 19:48:19.739 [WARN] monitor: rest = 2.043692
zmap: /home/pstephens/zmap-dev/src/monitor.c:165: compute_remaining_time: Assertion `zconf.cooldown_secs - (now() - zsend.finish) >= 0' failed.

I'm not entirely sure how this is happening, but this fix seems both relatively reasonable and sufficient to prevent it happening again.

@phillip-stephens phillip-stephens linked an issue Mar 15, 2024 that may be closed by this pull request
@phillip-stephens
Copy link
Contributor Author

LMK what you think @zakird or if you see an alternative, nothing immediately sprung to mind.

@phillip-stephens phillip-stephens marked this pull request as ready for review March 15, 2024 19:17
Copy link
Member

@zakird zakird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change to loop once (call min_d only once)

@phillip-stephens
Copy link
Contributor Author

Addressed!

@phillip-stephens phillip-stephens requested a review from zakird March 15, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect percent-complete in status updates file

2 participants