Last active
August 29, 2015 14:04
-
-
Save khia/656532d41ce1332f471b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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