Accept class methods as benchmark functions