Collections.addAll(options, COMMON_OPTIONS);
options.add(AppIHOP.class.getName());
OutputAnalyzer out = executeTest(options);
// Checks that log contains message which indicates that IHOP prediction is active if (isIhopAdaptive) {
IhopUtils.checkAdaptiveIHOPWasActivated(out);
} // Checks that log contains messages which indicates that VM initiates/checks heap occupancy // and tries to start concurrent cycle.
IhopUtils.checkErgoMessagesExist(out);
// Checks threshold and occupancy values
IhopUtils.checkIhopLogValues(out);
}
privatestatic OutputAnalyzer executeTest(List<String> options) throws Throwable, RuntimeException {
OutputAnalyzer out = ProcessTools.executeTestJvm(options); if (out.getExitValue() != 0) {
System.out.println(out.getOutput()); thrownew RuntimeException("AppIHOP failed with exit code" + out.getExitValue());
} return out;
}
publicfinalstatic LinkedList<Object> GARBAGE = new LinkedList<>();
privatefinalint ITERATIONS = 10; privatefinalint OBJECT_SIZE = 100000; // 60% of the heap will be filled before test cycles. // 30% of the heap will be filled and freed during test cycle. privatefinallong HEAP_PREALLOC_PCT = 60; privatefinallong HEAP_ALLOC_PCT = 30; privatefinallong HEAP_SIZE; // Amount of memory to be allocated before iterations start privatefinallong HEAP_PREALLOC_SIZE; // Amount of memory to be allocated and freed during iterations privatefinallong HEAP_ALLOC_SIZE; privatefinalint SLEEP_TIME;
publicstaticvoid main(String[] args) throws InterruptedException { new AppIHOP().start();
}
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.