-
Notifications
You must be signed in to change notification settings - Fork 81
Closed
Description
Is your feature request related to a problem? Please describe.
I have a use case for determining the packet loss percentage from a ping request. I don't believe this library supports that.
Describe the solution you'd like
I would like to be able to determine the percentage of packets lost in a ping request. Similar to how a successful ping can be determined:
# Supported
ping("localhost").success()
# Not supported
pint("localhost").packet_loss()
Describe alternatives you've considered
I've forked the library and have what I think is a naive implementation:
# In executor.py > ResponseList
def packet_loss(self):
success_list = [resp.success for resp in self._responses]
return (success_list.count(False) / len(success_list)) * 100
Additional context
I noticed there was a comment on another issue where someone mentioned they were also interested in determining packet loss. If this is a feature that you would be willing to add to the library, I'd be more than happy to submit a PR for it!
alessandromaggio, liliematia and andeh575
Metadata
Metadata
Assignees
Labels
No labels