protected void setUp() throws Exception { monitor = new FlatMonitor(); monitor.start(); }
/** * * Configures {@link EtmManager} to use a {@link FlatMonitor} * or {@link NestedMonitor} depending on the given parameter * with the given ExecutionTimer and Aggregator chain.. * * @param nested True creates an NestedMonitor, false a FlatMonitor. * @param aggregator The aggregator chain to be used. * @param timer The ExecutionTimer to be used. */ public static void configure(boolean nested, ExecutionTimer timer, Aggregator aggregator) { if (nested) { EtmManager.configure(new NestedMonitor(timer, aggregator)); } else { EtmManager.configure(new FlatMonitor(timer, aggregator)); } }
/** * * Configures {@link EtmManager} to use a {@link FlatMonitor} * or {@link NestedMonitor} depending on the given parameter * with the given ExecutionTimer and Aggregator chain.. * * @param nested True creates an NestedMonitor, false a FlatMonitor. * @param aggregator The aggregator chain to be used. * @param timer The ExecutionTimer to be used. */ public static void configure(boolean nested, ExecutionTimer timer, Aggregator aggregator) { if (nested) { EtmManager.configure(new NestedMonitor(timer, aggregator)); } else { EtmManager.configure(new FlatMonitor(timer, aggregator)); } }
protected void setUp() throws Exception { super.setUp(); monitor = new FlatMonitor(); monitor.start(); }
protected void setUp() throws Exception { super.setUp(); monitor = new FlatMonitor(EtmMonitorFactory.bestAvailableTimer(), new BufferedTimedAggregator(new RootAggregator())); monitor.start(); }
protected void setUp() throws Exception { super.setUp(); monitor = new FlatMonitor(EtmMonitorFactory.bestAvailableTimer(), new BufferedThresholdAggregator(new RootAggregator())); monitor.start(); }
/** * Tests the log aggregator filtering mechanism. If filtering works * the overall implementation works. */ public void testWithoutFilter() { EtmMonitor monitor = new FlatMonitor(); monitor.start(); TestLogAggregator aggregator = new TestLogAggregator(new RootAggregator()); aggregator.add(createCollectedPoint(monitor, "Action Foo")); aggregator.add(createCollectedPoint(monitor, "Action Bar")); aggregator.add(createCollectedPoint(monitor, "AnotherPoint")); aggregator.add(createCollectedPoint(monitor, "ClassName")); aggregator.add(createCollectedPoint(monitor, "Action Bar")); assertEquals(5, aggregator.points.size()); }
/** * Tests the log aggregator filtering mechanism. If filtering works * the overall implementation works. */ public void testFilter() { EtmMonitor monitor = new FlatMonitor(); monitor.start(); TestLogAggregator aggregator = new TestLogAggregator(new RootAggregator()); aggregator.setFilterPattern("Action.+;ClassName;"); aggregator.add(createCollectedPoint(monitor, "Action Foo")); aggregator.add(createCollectedPoint(monitor, "Action Bar")); aggregator.add(createCollectedPoint(monitor, "AnotherPoint")); aggregator.add(createCollectedPoint(monitor, "ClassName")); aggregator.add(createCollectedPoint(monitor, "Action Bar")); assertEquals(4, aggregator.points.size()); }