https://github.com/appmonet/latency_tracker
An Elixir GenServer that will periodically ping a list of hosts and write the average latency to an ETS table.
https://github.com/appmonet/latency_tracker
Last synced: 4 months ago
JSON representation
An Elixir GenServer that will periodically ping a list of hosts and write the average latency to an ETS table.
- Host: GitHub
- URL: https://github.com/appmonet/latency_tracker
- Owner: AppMonet
- Created: 2023-05-19T09:30:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-19T09:57:47.000Z (about 3 years ago)
- Last Synced: 2024-11-27T12:38:40.769Z (over 1 year ago)
- Language: Elixir
- Size: 9.77 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LatencyTracker
A GenServer that will periodically ping a list of hosts and write the average latency to an ETS table.
## Example:
```
iex(1)> LatencyTracker.start_link([hosts: [[hostname: "google.com", alias: :google]]])
{:ok, #PID<0.234.0>}
iex(2)> LatencyTracker.average_latency(:google)
42.7
```
## Installation
```elixir
def deps do
[
{:latency_tracker, github: "AppMonet/latency_tracker"}
]
end
```
Unfortunately we cannot publish this library to Hex as it depends on `hauleth/gen_icmp` which is not published on hex and that name is already taken.
The icmp libraries that are on hex require more complex configuration/settings in order to use, for example `:icmp` requires: `sudo setcap cap_net_raw=+ep /path/to/beam.smp`