Add benchmark module
This commit is contained in:
parent
ca4cd88fff
commit
1964c576fc
|
@ -0,0 +1,8 @@
|
|||
defmodule Benchmark do
|
||||
def measure(function) do
|
||||
function
|
||||
|> :timer.tc()
|
||||
|> elem(0)
|
||||
|> Kernel./(1_000_000)
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue