Skip to content

Instantly share code, notes, and snippets.

@khia
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khia/656532d41ce1332f471b to your computer and use it in GitHub Desktop.
Save khia/656532d41ce1332f471b to your computer and use it in GitHub Desktop.
def benchmark(f, args \\ [], min_duration \\ @default_duration)
def benchmark(f, args, min_duration) when is_list(f) and is_list(args) do
Enum.map(f, fn(fp) -> benchmark(fp, args, min_duration) end)
end
def benchmark(f, args, min_duration) when is_function(f) do
IO.inspect fp
results = do_benchmark(fp, args, min_duration)
IO.puts results
results
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment