flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tzu-Li (Gordon) Tai" <tzuli...@apache.org>
Subject Re: Testing Metrics
Date Wed, 25 Apr 2018 07:11:48 GMT
Hi,

Do you mean tests to verify that some metric is actually registered?

AFAIK, this is not really easy to do as a unit test.

One possible way is to have an integration test that uses a metrics reporter, from which you
verify against.
For example, the Kafka consumer integration tests that uses the JMXReporter for a submitted
job and queries results from that to verify that some specific metrics are forwarded from
the Kafka client.
We also have an end-to-end test for savepointing, that uses the SLF4JReporter to write metrics
to logs, which are parsed for a specific metric to monitor progress.

Also pulling in Chesnay (in CC), who might have more ideas here.

Cheers,
Gordon

On 25 April 2018 at 1:59:18 AM, Julio Biason (julio.biason@azion.com) wrote:

Hey guys and gals,

Just wondering: Does anyone have an idea how to test if metrics are being generated? I have
an integration test and I just added a processor to count elements in late arrivals (the general
idea is to capture those, count and get an average, so we can adjust the allowedLateness)
but now I'm wondering if there is a way I can integrate this into the test itself.

Possible? Not possible? Ideas?

--
Julio Biason, Sofware Engineer
AZION  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101  |  Mobile: +55 51 99907 0554
Mime
View raw message