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

Improve ping script output readability #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ThirteenFish
Copy link
Contributor

@ThirteenFish ThirteenFish commented Oct 8, 2024

Previously each ping iteration could print up to three lines, and it was sometimes easy to miss if the latest iteration succeeded or failed. This tries to limit each iteration to only a single vertically aligned line, printing information as it comes in.

While I was here I simplified the implementation:

  • By being a little more careful about where and how long blocking happens I was able to drop multiple threads. This makes coordinating printing lines and shared data much easier
  • Removed previous loop timestamp tracking, it didn't seem to work anyway?

(unit tests are failing for unrelated reasons, because of the updated cfdp-py dependency. Fixed when #44 is merged.)

Previously each ping iteration could print up to three lines, and it was
sometimes easy to miss if the latest iteration succeeded or failed. This
tries to limit each iteration to only a single vertically aligned line,
printing information as it comes in.

While I was here I simplified the implementation:
- By being a little more careful about where and how long blocking
  happens I was able to drop multiple threads. This makes coordinating
  printing lines and shared data much easier
- Removed previous loop timestamp tracking, it didn't seem to work
  anyway?
Copy link
Member

@ryanpdx ryanpdx left a comment

Choose a reason for hiding this comment

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

This is simpler, but it does remove some functionality, tho the need for that functionality is an edge case.

The new style seems to expect one or none ping responses between sent pings while the old style could handle receiving any response at any time.

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.

2 participants