Java Code Examples for org.apache.flink.metrics.Counter#getCount()

The following examples show how to use org.apache.flink.metrics.Counter#getCount() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TaskIOMetricGroup.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public long getCount() {
	long sum = super.getCount();
	for (Counter counter : internalCounters) {
		sum += counter.getCount();
	}
	return sum;
}
 
Example 2
Source File: AbstractPrometheusReporter.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
private static io.prometheus.client.Gauge.Child gaugeFrom(Counter counter) {
	return new io.prometheus.client.Gauge.Child() {
		@Override
		public double get() {
			return (double) counter.getCount();
		}
	};
}
 
Example 3
Source File: TaskIOMetricGroup.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public long getCount() {
	long sum = super.getCount();
	for (Counter counter : internalCounters) {
		sum += counter.getCount();
	}
	return sum;
}
 
Example 4
Source File: AbstractPrometheusReporter.java    From flink with Apache License 2.0 5 votes vote down vote up
private static io.prometheus.client.Gauge.Child gaugeFrom(Counter counter) {
	return new io.prometheus.client.Gauge.Child() {
		@Override
		public double get() {
			return (double) counter.getCount();
		}
	};
}
 
Example 5
Source File: TaskIOMetricGroup.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public long getCount() {
	long sum = super.getCount();
	for (Counter counter : internalCounters) {
		sum += counter.getCount();
	}
	return sum;
}
 
Example 6
Source File: AbstractPrometheusReporter.java    From flink with Apache License 2.0 5 votes vote down vote up
private static io.prometheus.client.Gauge.Child gaugeFrom(Counter counter) {
	return new io.prometheus.client.Gauge.Child() {
		@Override
		public double get() {
			return (double) counter.getCount();
		}
	};
}
 
Example 7
Source File: MetricDumpSerialization.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
private static void serializeCounter(DataOutput out, QueryScopeInfo info, String name, Counter counter) throws IOException {
	long count = counter.getCount();
	serializeMetricInfo(out, info);
	out.writeUTF(name);
	out.writeLong(count);
}
 
Example 8
Source File: MetricDumpSerialization.java    From flink with Apache License 2.0 4 votes vote down vote up
private static void serializeCounter(DataOutput out, QueryScopeInfo info, String name, Counter counter) throws IOException {
	long count = counter.getCount();
	serializeMetricInfo(out, info);
	out.writeUTF(name);
	out.writeLong(count);
}
 
Example 9
Source File: MetricDumpSerialization.java    From flink with Apache License 2.0 4 votes vote down vote up
private static void serializeCounter(DataOutput out, QueryScopeInfo info, String name, Counter counter) throws IOException {
	long count = counter.getCount();
	serializeMetricInfo(out, info);
	out.writeUTF(name);
	out.writeLong(count);
}