Skip to content

Conversation

isosphere
Copy link
Contributor

@isosphere isosphere commented Jun 8, 2025

Current screenshot: (will update as I push changes)

image

This draft PR is open for feedback.

I think the histogram gives a nice sense of the distribution of ping times in a way a time series plot doesn't. I'm pretty happy with how this is working for myself.

Shortcomings as of this writing:

  • It could look better; some styling?
  • It's sampling from all contacted hosts
  • The x-axis isn't labelled
  • It could be much more efficient12
  • The bins are hardcoded and range from 1 ms to 1 second, which may not be appropriate in all situations

I think the last item should be fixed before this is merged, it's fairly long-hanging fruit.

Footnotes

  1. CPU: it recalculates the bin counts from scratch every time a sample is added

  2. Memory: it collects its own sample cache, which is redundant and possibly misleading, as DEFAULT_WINDOW_SIZE need not correspond with the time series chart extent at all.

@isosphere
Copy link
Contributor Author

isosphere commented Jun 24, 2025

I've added a toggle via a keypress of h. The histogram is disabled by default, though it will collect ping response samples in the background up to its default buffer size of 500.

The currently inefficient binning code is only active when the histogram is.

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.

1 participant