pub fn profile_fn<F, T>(name: &str, f: F) -> Twhere F: FnOnce() -> T,
Helper function to profile a block of code and return its result