Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capped percent complete in monitor.c #825

Merged
merged 7 commits into from Mar 16, 2024
Merged

Capped percent complete in monitor.c #825

merged 7 commits into from Mar 16, 2024

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!

@zakird zakird merged commit df098d8 into main Mar 16, 2024
11 checks passed
@zakird zakird deleted the phillip/823 branch March 16, 2024 00:05
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