* (CompileError): undefined function

As for this part, have you tried for example Benchmark.run(&Module.function/n, 20, 5) (substituting module, function, and n for the respective module, function, and arity)? Then you could call the function with function.(args) (note the period).

EDIT: For more information about function capturing, see: https://elixir-lang.org/getting-started/modules-and-functions.html#function-capturing