Commit 5245dbde authored by Florian Fittkau's avatar Florian Fittkau

probe disabiling

parent 9b6b26c1
......@@ -29,6 +29,8 @@ public enum MonitoringController { // Singleton (Effective Java #3)
16, 0.75f, 2);
private final AtomicInteger stringRegIndex = new AtomicInteger(0);
private volatile boolean monitoringEnabled = true;
private MonitoringController() {
final ExecutorService exec = Executors.newCachedThreadPool();
final Disruptor<ByteArrayEvent> disruptor = new Disruptor<ByteArrayEvent>(
......@@ -174,4 +176,12 @@ public enum MonitoringController { // Singleton (Effective Java #3)
}
return sb;
}
public boolean isMonitoringEnabled() {
return monitoringEnabled;
}
public void setMonitoringEnabled(final boolean monitoringEnabled) {
this.monitoringEnabled = monitoringEnabled;
}
}
......@@ -29,6 +29,10 @@ public abstract class AbstractAspect {
@Around("monitoredOperation()")
public Object operation(final ProceedingJoinPoint thisJoinPoint)
throws Throwable {
if (!CTRLINST.isMonitoringEnabled()) {
return thisJoinPoint.proceed();
}
// if (!CTRLINST.isProbeActivated(signature)) { // TODO
// return thisJoinPoint.proceed();
// }
......
......@@ -10,7 +10,7 @@ public class TestStart {
public void run() {
for (int i = 0; i < 400000000; i++) {
// final TestClass testClass = new TestClass();
TestClass.testMethod(30);
TestClass.testMethod(1);
}
}
}).run();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment