/**
* Initialize metrics used by this class and its subclasses.
*/
public static void initMetrics() {
GiraphMetricsRegistry metrics = GiraphMetrics.get().perJobRequired();
final Counter edgesFiltered = getTotalEdgesFilteredCounter();
final Meter edgesLoaded = getTotalEdgesLoadedMeter();
metrics.getGauge(MetricNames.EDGES_FILTERED_PCT, new PercentGauge() {
@Override protected double getNumerator() {
return edgesFiltered.count();
}
@Override protected double getDenominator() {
return edgesLoaded.count();
}
});
final Counter verticesFiltered = getTotalVerticesFilteredCounter();
final Meter verticesLoaded = getTotalVerticesLoadedMeter();
metrics.getGauge(MetricNames.VERTICES_FILTERED_PCT, new PercentGauge() {
@Override protected double getNumerator() {
return verticesFiltered.count();
}
@Override protected double getDenominator() {