diff --git a/nb-adapters/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/Cqld4Space.java b/nb-adapters/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/Cqld4Space.java index dc0343437..d640c5d29 100644 --- a/nb-adapters/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/Cqld4Space.java +++ b/nb-adapters/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/Cqld4Space.java @@ -85,6 +85,7 @@ public class Cqld4Space extends BaseSpace { // stop insights for testing OptionsMap defaults = new OptionsMap(); defaults.put(TypedDriverOption.MONITOR_REPORTING_ENABLED, false); // We don't need to do this every time we run a test or sanity check + defaults.put(TypedDriverOption.SESSION_LEAK_THRESHOLD, 100000000); DriverConfigLoader dcl = DriverConfigLoader.fromMap(defaults); // add streamlined cql parameters diff --git a/nb-engine/nb-engine-core/src/main/java/io/nosqlbench/engine/core/lifecycle/session/NBSession.java b/nb-engine/nb-engine-core/src/main/java/io/nosqlbench/engine/core/lifecycle/session/NBSession.java index 4113251d2..4a5180d20 100644 --- a/nb-engine/nb-engine-core/src/main/java/io/nosqlbench/engine/core/lifecycle/session/NBSession.java +++ b/nb-engine/nb-engine-core/src/main/java/io/nosqlbench/engine/core/lifecycle/session/NBSession.java @@ -31,10 +31,7 @@ import io.nosqlbench.nb.api.labels.NBLabeledElement; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.lang.management.ManagementFactory; -import java.lang.management.MemoryMXBean; -import java.lang.management.MemoryManagerMXBean; -import java.lang.management.MemoryPoolMXBean; +import java.lang.management.*; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -48,8 +45,9 @@ import java.util.function.Function; */ public class NBSession extends NBHeartbeatComponent implements Function, ExecutionResult>, NBTokenWords { private final static Logger logger = LogManager.getLogger(NBSession.class); -// private final ClientSystemMetricChecker clientMetricChecker; + // private final ClientSystemMetricChecker clientMetricChecker; private MemoryMXBean mbean = ManagementFactory.getMemoryMXBean(); + private OperatingSystemMXBean osbean = ManagementFactory.getOperatingSystemMXBean(); private final Map containers = new ConcurrentHashMap<>(); @@ -74,6 +72,17 @@ public class NBSession extends NBHeartbeatComponent implements Function (double) osb.getOpenFileDescriptorCount(), + MetricCategory.Internals, + "open file descriptors" + ); + } + // on-heap create().gauge( "on_heap_memory_used", @@ -135,7 +144,7 @@ public class NBSession extends NBHeartbeatComponent implements Function