private void executeFunction(Function<? super String[]> function, Duration duration,
      boolean successful) {
    Execution<String[], Object, List<Object>> execution =
        uncheckedCast(FunctionService.onServer(serverPool));

    execution
        .setArguments(new String[] {valueOf(duration.toMillis()), valueOf(successful)})
        .execute(function)
        .getResult();
  }
Acceptance tests for function executions timer on a loner server with no locator
geode-assembly/src/acceptanceTest/java/org/apache/geode/metrics/function/executions/FunctionExecutionsTimerLonerTest.java