Commit e803bad6 authored by Florian Fittkau's avatar Florian Fittkau

continous_monitoring_enabled switch

parent 26734d98
......@@ -11,5 +11,5 @@
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="explorviz.monitoring.main.MonitoringStarter"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="monitored-application"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:lib/aspectjweaver-1.8.5.jar -Xmx4G"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:lib/aspectjweaver-1.8.5.jar -Xmx4G -Dexplorviz.live_trace_processing.continous_monitoring_enabled=true"/>
</launchConfiguration>
......@@ -25,6 +25,8 @@ explorviz.live_trace_processing.android_monitoring=false
explorviz.live_trace_processing.monitoring_enabled=true
explorviz.live_trace_processing.system_monitoring_enabled=true
explorviz.live_trace_processing.continous_monitoring_enabled=false
explorviz.live_trace_processing.monitoring_controller_disruptor_size=32
######################## Analysis ########################
......
......@@ -22,6 +22,7 @@ import com.lmax.disruptor.dsl.ProducerType;
import explorviz.live_trace_processing.Constants;
import explorviz.live_trace_processing.configuration.Configuration;
import explorviz.live_trace_processing.configuration.ConfigurationFactory;
import explorviz.live_trace_processing.probe.tracemanagement.TraceRegistry;
import explorviz.live_trace_processing.reader.RemoteConfigurationServlet;
import explorviz.live_trace_processing.record.ISerializableRecord;
import explorviz.live_trace_processing.record.misc.SystemMonitoringRecord;
......@@ -52,6 +53,8 @@ public class MonitoringController {
final boolean systemMonitorEnabled = configuration
.getBooleanProperty(ConfigurationFactory.SYSTEM_MONITORING_ENABLED);
TraceRegistry.init(configuration);
final WaitStrategy waitStrategy = new BlockingWaitStrategy(); // new
// YieldingWaitStrategy();
// if ((monitoringEnabled == false) && (systemMonitorEnabled == true)) {
......
......@@ -3,16 +3,25 @@ package explorviz.live_trace_processing.probe.tracemanagement;
import java.security.SecureRandom;
import java.util.concurrent.atomic.AtomicLong;
import explorviz.live_trace_processing.configuration.Configuration;
import explorviz.live_trace_processing.configuration.ConfigurationFactory;
import explorviz.live_trace_processing.main.MonitoringController;
import explorviz.live_trace_processing.probe.AbstractAspect;
public final class TraceRegistry {
private static boolean continous_monitoring;
private static final AtomicLong nextTraceId;
private static final ThreadLocalProbeTraceMetaData traceStorage = new ThreadLocalProbeTraceMetaData();
static {
final long uniqueOffset = new SecureRandom().nextLong();
nextTraceId = new AtomicLong(uniqueOffset);
}
public static final void init(final Configuration config) {
continous_monitoring = config
.getBooleanProperty(ConfigurationFactory.CONTINOUS_MONITORING_ENABLED);
}
public static final ProbeTraceMetaData getTrace() {
......@@ -25,6 +34,8 @@ public final class TraceRegistry {
protected static final void unregisterTrace(final ProbeTraceMetaData trace) {
trace.reset();
MonitoringController.sendOutBuffer(AbstractAspect.bufferStore.get());
if (!continous_monitoring) {
MonitoringController.sendOutBuffer(AbstractAspect.bufferStore.get());
}
}
}
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