publicstaticvoid main(String... args) throws Exception { final String name = "MyLargeJavaEvent64k"; // name of synthetically generated event final String fieldNamePrefix = "myfield"; finalint numberOfFields = 8; // 8*8k = ~64k event size final Map<String, Object> eventMap = new HashMap<>(); finalint numberOfThreads = 100; // 50 threads will run the test finalint numberOfEventsPerThread = 50; // each thread will generate 50 events
List<ValueDescriptor> fields = new ArrayList<>(); for (int i = 0; i < numberOfFields; ++i) {
String fieldName = fieldNamePrefix + i;
eventMap.put(fieldName, largeString());
fields.add(new ValueDescriptor(String.class, fieldName));
}
EventTypePrototype prototype = new EventTypePrototype(name,Collections.emptyList(), fields);
EventFactory ef = EventFactory.create(prototype.getAnnotations(), prototype.getFields());
Recording r = new Recording();
r.enable(prototype.getName()).withThreshold(Duration.ofNanos(0)).withoutStackTrace();
r.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.