@Override public void gather(MetricsCollector collector) { collector.metric("kernel_active_operations", "active-operations", "Active-Operations", ops.size(), null); collector.metric("kernel_hanging_operations", "hanging-operations", "Hanging-Operations", getActiveOperations().stream().filter(Operation::isOvertime).count(), null); } }
private static void outputActiveOperations() { if (!Operation.getActiveOperations().isEmpty()) { LOG.INFO("Active Operations"); LOG.INFO(SEPARATOR_LINE); for (Operation op : Operation.getActiveOperations()) { LOG.INFO(op.toString()); } LOG.INFO(SEPARATOR_LINE); } }
List<Operation> ops = Operation.getActiveOperations(); if (!ops.isEmpty()) { output.blankLine();