@Test public void onPass() throws Exception { FakeMetricExtension extension = new FakeMetricExtension(); MetricExtensionProvider.addMetricExtension(extension); MetricEntryCallback entryCallback = new MetricEntryCallback(); StringResourceWrapper resourceWrapper = new StringResourceWrapper("resource", EntryType.OUT); int count = 2; Object[] args = {"args1", "args2"}; entryCallback.onPass(null, resourceWrapper, null, count, args); Assert.assertEquals(extension.pass, count); Assert.assertEquals(extension.thread, 1); }
@Override public void onPass(Context context, ResourceWrapper resourceWrapper, DefaultNode param, int count, Object... args) throws Exception { for (MetricExtension m : MetricExtensionProvider.getMetricExtensions()) { m.increaseThreadNum(resourceWrapper.getName(), args); m.addPass(resourceWrapper.getName(), count, args); } }
MetricEntryCallback implements ProcessorSlotEntryCallback<DefaultNode> { @Override public void onPass(Context context, ResourceWrapper resourceWrapper, DefaultNode param, int count, Object... args) throws Exception { for (MetricExtension m : MetricExtensionProvider.getMetricExtensions()) { m.increaseThreadNum(resourceWrapper.getName(), args); m.addPass(resourceWrapper.getName(), count, args); } } }
MetricEntryCallback implements ProcessorSlotEntryCallback<DefaultNode> { @Override public void onPass(Context context, ResourceWrapper resourceWrapper, DefaultNode param, int count, Object... args) throws Exception { for (MetricExtension m : MetricExtensionProvider.getMetricExtensions()) { m.increaseThreadNum(resourceWrapper.getName(), args); m.addPass(resourceWrapper.getName(), count, args); } }  }
MetricEntryCallback implements ProcessorSlotEntryCallback<DefaultNode> { @Override public void onPass(Context context, ResourceWrapper resourceWrapper, DefaultNode param, int count, Object... args) throws Exception { for (MetricExtension m : MetricExtensionProvider.getMetricExtensions()) { m.increaseThreadNum(resourceWrapper.getName(), args); m.addPass(resourceWrapper.getName(), count, args); } }  @Override void onPass(Context context, ResourceWrapper resourceWrapper, DefaultNode param,
                       int count, Object... args); @Override void onBlocked(BlockException ex, Context context, ResourceWrapper resourceWrapper,
                          DefaultNode param, int count, Object... args); }
MetricEntryCallback implements ProcessorSlotEntryCallback<DefaultNode> { @Override public void onPass(Context context, ResourceWrapper resourceWrapper, DefaultNode param, int count, Object... args) throws Exception { for (MetricExtension m : MetricExtensionProvider.getMetricExtensions()) { m.increaseThreadNum(resourceWrapper.getName(), args); m.addPass(resourceWrapper.getName(), count, args); } }  @Override void onPass(Context context, ResourceWrapper resourceWrapper, DefaultNode param,
                       int count, Object... args); @Override void onBlocked(BlockException ex, Context context, ResourceWrapper resourceWrapper,
                          DefaultNode param, int count, Object... args);  }