public static SuperstepMetricsRegistry create(GiraphConfiguration conf,
long superstep) {
if (conf.metricsEnabled()) {
MetricsRegistry registry = new MetricsRegistry();
SuperstepMetricsRegistry superstepMetrics = new SuperstepMetricsRegistry(
registry, new JmxReporter(registry),
"giraph.superstep", String.valueOf(superstep));
superstepMetrics.superstep = superstep;
return superstepMetrics;
} else {
return createFake();