use of org.javasimon.Stopwatch in project midpoint by Evolveum.
the class MidScaleNewRepoTest method test611AddPeakShadows.
@Test
public void test611AddPeakShadows() throws SchemaException {
OperationResult operationResult = createOperationResult();
Stopwatch stopwatch = stopwatch("shadow.addPeak", "Repository addObject(shadow) - 3rd batch");
for (int userIndex = 1; userIndex <= PEAK_USER_COUNT; userIndex++) {
for (Map.Entry<String, String> resourceEntry : resources.entrySet()) {
String name = String.format("shadow-peak-%07d-at-%s", userIndex, resourceEntry.getKey());
ShadowType shadowType = createShadow(name, resourceEntry.getValue());
try (Split ignored = stopwatch.start()) {
repositoryService.addObject(shadowType.asPrismObject(), null, operationResult);
} catch (ObjectAlreadyExistsException e) {
// Ignored
}
}
}
// no query recorder in this test
}
Aggregations