@SuppressWarnings("resource") publicstaticvoid main(String[] args) throws Throwable { // Create some disk recordings
Recording[] recordings = new Recording[5]; for (int i = 0; i < RECORDING_COUNT; i++) {
Recording r = new Recording();
r.setToDisk(true);
r.start();
CorrelationEvent ce = new CorrelationEvent();
ce.id = i;
ce.commit();
r.stop();
recordings[i] = r;
}
Path dir = Paths.get("reconstruction-parts");
Files.createDirectories(dir);
long expectedCount = 0; for (int i = 0; i < RECORDING_COUNT; i++) {
Path tmp = dir.resolve("chunk-part-" + i + ".jfr");
recordings[i].dump(tmp);
expectedCount += countEventInRecording(tmp);
}
// test success
output = ExecuteHelper.jfr("assemble", directory, destination);
System.out.println(output.getOutput());
output.shouldContain("Finished.");
long reconstructedCount = countEventInRecording(destinationPath);
Asserts.assertEquals(expectedCount, reconstructedCount); // Cleanup for (int i = 0; i < RECORDING_COUNT; i++) {
recordings[i].close();
}
}
privatestaticlong countEventInRecording(Path file) throws IOException {
Integer lastId = -1; try (RecordingFile rf = new RecordingFile(file)) { long count = 0; while (rf.hasMoreEvents()) {
RecordedEvent re = rf.readEvent(); if (re.getEventType().getName().equals("Correlation")) {
Integer id = re.getValue("id"); if (id < lastId) {
Asserts.fail("Expected chunk number to increase");
}
lastId = id;
}
count++;
} return count;
}
}
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.18Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-10)
¤
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.