I have written a very simple java program for Apache Flink and now I am interested in measuring statistics such as throughput (number of tuples processed per second) and latency (the time the program needs to process every input tuple).
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.readTextFile("/home/LizardKing/Documents/Power/Prova.csv")
.map(new MyMapper().writeAsCsv("/home/LizardKing/Results.csv");
JobExecutionResult res = env.execute();
I know that Flink exposes some metrics:
https://ci.apache.org/projects/flink/flink-docs-release-1.2/monitoring/metrics.html
But I am not sure how to use them in order to obtain what I want. From the link I have read that a "meter" can be used to measure the average throughput but, after having defined it, how should I use it?
Meter
in yourMyMapper
function, just as shown in the link you provided. You can watch the metrics live in the Flink web dashboard. – us2012