Measuring Latency and HTTP status with elixir

I’m looking for a library that allows me to make a request to a url and measure the url latency, review the status response, headers, SSL status, etc?

Is there anything like that currently available?

1 Like

You can probably use httpoison for the requests and Elixir:Time for the latency.

To view response, headers, etc, HTTPoison will let you do that. As far as measuring response times for a request, you could measure that with os:timestamp() or Elixir.Time.

I’d rather use monotonic time if the code runs on a vm to avoid skews. And keep the measurements (request, parsing, etc) in the process dictionary (if needed).

But replace :os.timestamp() with :erlang.monotonic_time().

1 Like

Good point :+1:

There is also a monotonic_time() function in elixir System.monotonic_time().

And what cool is that in the documentation for the System module there is an example of why you should use monotonic time instead of an os:timestamp.

@amacgregor have a look at

1 Like

Unfortunately, I’m not trying to instrument my current app but using elixir to run test against other domains.

1 Like