Add benchmark module
This commit is contained in:
parent
e14d02025c
commit
f4ce369998
8
lib/benchmark.ex
Normal file
8
lib/benchmark.ex
Normal file
@ -0,0 +1,8 @@
|
||||
defmodule Benchmark do
|
||||
def measure(function) do
|
||||
function
|
||||
|> :timer.tc()
|
||||
|> elem(0)
|
||||
|> Kernel./(1_000_000)
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user