The method ExecutionEnvironment.execute()returns an object JobExecutionResultcontaining the runtime.
You can, for example, do something like this:
JobExecutionResult result = env.execute("My Flink Job");
System.out.println("The job took " + result.getNetRuntime(TimeUnit.SECONDS) + " to execute");
source
share