Skip to content

Instantly share code, notes, and snippets.

View blasphemetheus's full-sized avatar
:shipit:

Bradley Fargo blasphemetheus

:shipit:
  • The Ether
View GitHub Profile
@evadne
evadne / a-reverse-bench.exs
Last active July 21, 2024 16:14
Reversing Binaries in Elixir
defmodule Benchmarker do
def run(title, module, function, size \\ 1024, iterations \\ 100) do
times = for (_ <- 1 .. iterations) do
data = :crypto.strong_rand_bytes(size)
{duration, _value} = :timer.tc fn ->
apply(module, function, [data])
end
duration
end