Add benchmark module
This commit is contained in:
parent
e14d02025c
commit
f4ce369998
|
@ -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