View Source Speedtest (Speedtest v1.1.2)

Speedtest.net client for Elixir.

Summary

Functions

Perform a speedtest.net "ping" to determine which speedtest.net server has the lowest latency

Limit servers to the closest speedtest.net servers based on geographic distance

Determine distance between sets of [lat,lon] in km

Test download speed against speedtest.net

Retrieve a the list of speedtest.net servers, optionally filtered to servers matching those specified in the servers argument

Setup the base speedtest

Ping an IP and return a tuple with the time

Run the full speedtest.net test

Test upload speed against speedtest.net

Functions

Link to this function

choose_best_server(servers)

View Source

Perform a speedtest.net "ping" to determine which speedtest.net server has the lowest latency

## Examples

iex> Speedtest.choose_best_server([])
Link to this function

choose_closest_servers(servers \\ [], amount \\ 2)

View Source

Limit servers to the closest speedtest.net servers based on geographic distance

## Examples

 iex> Speedtest.choose_closest_servers()
Link to this function

distance(speedtest \\ %Speedtest{})

View Source

Determine distance between sets of [lat,lon] in km

Examples

iex> Speedtest.distance(%Speedtest{})

Link to this function

download(speedtest \\ %Speedtest{})

View Source

Test download speed against speedtest.net

Examples

iex> Speedtest.download(%Speedtest{})

Link to this function

fetch_servers(speedtest \\ %Speedtest{})

View Source

Retrieve a the list of speedtest.net servers, optionally filtered to servers matching those specified in the servers argument

## Examples

 iex> Speedtest.fetch_servers(%Speedtest{})

Setup the base speedtest

Examples

iex> Speedtest.init() {:ok, %Speedtest{config: [],exclude: nil,include: nil,result: nil,selected_server: nil,servers: [],threads: nil}}

Ping an IP and return a tuple with the time

Examples

iex> Speedtest.ping("127.0.0.1")

Run the full speedtest.net test

Examples

iex> Speedtest.run()

Link to this function

upload(speedtest \\ %Speedtest{})

View Source

Test upload speed against speedtest.net

Examples

iex> Speedtest.upload(%Speedtest{})