for (String line : lines) { if (line.contains(warning_kernel_no_pids_support)) {
System.out.println("Docker pids limitation seems not to work, avoiding check"); return;
}
if (line.contains(lineMarker)) {
lineMarkerFound = true;
String[] parts = line.split(":");
System.out.println("DEBUG: line = " + line);
System.out.println("DEBUG: parts.length = " + parts.length); if (expectedValue.equals("any_integer")) {
Asserts.assertEquals(parts.length, 2);
String ivalue = parts[1].replaceAll("\\s",""); try { int ai = Integer.parseInt(ivalue);
System.out.println("Found " + lineMarker + " with value: " + ai + ". PASS.");
} catch (NumberFormatException ex) { thrownew RuntimeException("Could not convert " + ivalue + " to an integer, log line was " + line);
} break;
}
Asserts.assertEquals(parts.length, 2);
String actual = parts[1].replaceAll("\\s",""); // Unlimited pids leads on some setups not to "max" in the output, but to a high number if (expectedValue.equals("max")) { if (actual.equals("max")) {
System.out.println("Found expected max for unlimited pids value.");
} else { try { int ai = Integer.parseInt(actual); if (ai > 20000) {
System.out.println("Limit value " + ai + " got accepted as unlimited, log line was " + line);
} else { thrownew RuntimeException("Limit value " + ai + " is not accepted as unlimited, log line was " + line);
}
} catch (NumberFormatException ex) { thrownew RuntimeException("Could not convert " + actual + " to an integer, log line was " + line);
}
}
} else {
Asserts.assertEquals(actual, expectedValue);
} break;
}
}
Asserts.assertTrue(lineMarkerFound);
}
List<String> lines = Common.run(opts).asLines(); if (value.equals("Unlimited")) {
checkResult(lines, "Maximum number of tasks is: ", "max");
} else {
checkResult(lines, "Maximum number of tasks is: ", value);
} // current number of tasks value is hard to predict, so better expect no value
checkResult(lines, "Current number of tasks is: ", "any_integer");
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.