Generalized benchmarking into executing code and standalone benchmark functions