DecayRpcSchedulerDetailedMetrics { public String getName() { return name; } DecayRpcSchedulerDetailedMetrics(String ns); static DecayRpcSchedulerDetailedMetrics create(String ns); void init(int numLevels); void addQueueTime(int priority, long queueTime); void addProcessingTime(int priority, long processingTime); void shutdown(); String getQueueName(int priority); String getProcessingName(int priority); String getName();  }
@Test public void metricsRegistered() { Configuration conf = new Configuration(); DecayRpcScheduler scheduler = new DecayRpcScheduler(4, "ipc.8020", conf); MetricsSystem metricsSystem = DefaultMetricsSystem.instance(); DecayRpcSchedulerDetailedMetrics metrics = scheduler.getDecayRpcSchedulerDetailedMetrics(); assertNotNull(metricsSystem.getSource(metrics.getName())); scheduler.stop(); assertNull(metricsSystem.getSource(metrics.getName())); }