use of org.javasimon.Split in project midpoint by Evolveum.
the class MidScaleGuiTest method test220newUser.
@Test
public void test220newUser() {
logger.info(getTestName());
Stopwatch stopwatch = stopwatch("newUser", "New user");
for (int i = 0; i < REPETITION_COUNT; i++) {
tester.startPage(PageUser.class);
tester.debugComponentTrees();
try (Split ignored = stopwatch.start()) {
queryListener.start();
tester.executeAjaxEvent("detailsView:template:template:additionalButtons:0:additionalButton:compositedButton", "click");
}
}
queryListener.dumpAndStop();
tester.assertRenderedPage(PageUser.class);
OperationsPerformanceInformationType performanceInformation = OperationsPerformanceInformationUtil.toOperationsPerformanceInformationType(OperationsPerformanceMonitor.INSTANCE.getGlobalPerformanceInformation());
displayValue("Operation performance (by name)", OperationsPerformanceInformationUtil.format(performanceInformation));
displayValue("Operation performance (by time)", OperationsPerformanceInformationUtil.format(performanceInformation, new AbstractStatisticsPrinter.Options(AbstractStatisticsPrinter.Format.TEXT, AbstractStatisticsPrinter.SortBy.TIME), null, null));
// runTestFor(PageUser.class, "newUser", "New user");
}
use of org.javasimon.Split in project midpoint by Evolveum.
the class MidScaleGuiTest method test200sidebarMenu.
// doesn't work because of getPageBase usages
@Test(enabled = false)
public void test200sidebarMenu() {
logger.info(getTestName());
Stopwatch stopwatch = stopwatch("sidebar", "sidebar perf");
try (Split ignored = stopwatch.start()) {
queryListener.start();
tester.startComponentInPage(LeftMenuPanel.class);
}
queryListener.dumpAndStop();
OperationsPerformanceInformationType performanceInformation = OperationsPerformanceInformationUtil.toOperationsPerformanceInformationType(OperationsPerformanceMonitor.INSTANCE.getGlobalPerformanceInformation());
displayValue("Operation performance (by name)", OperationsPerformanceInformationUtil.format(performanceInformation));
displayValue("Operation performance (by time)", OperationsPerformanceInformationUtil.format(performanceInformation, new AbstractStatisticsPrinter.Options(AbstractStatisticsPrinter.Format.TEXT, AbstractStatisticsPrinter.SortBy.TIME), null, null));
}
use of org.javasimon.Split in project midpoint by Evolveum.
the class MidScaleGuiTest method runTestFor.
private void runTestFor(Class pageToRender, PageParameters params, String stopwatchName, String stopwatchDescription) {
Stopwatch stopwatch = stopwatch(stopwatchName, stopwatchDescription);
for (int i = 0; i < REPETITION_COUNT; i++) {
try (Split ignored = stopwatch.start()) {
queryListener.start();
tester.startPage(pageToRender);
}
}
queryListener.dumpAndStop();
tester.assertRenderedPage(pageToRender);
OperationsPerformanceInformationType performanceInformation = OperationsPerformanceInformationUtil.toOperationsPerformanceInformationType(OperationsPerformanceMonitor.INSTANCE.getGlobalPerformanceInformation());
displayValue("Operation performance (by name)", OperationsPerformanceInformationUtil.format(performanceInformation));
displayValue("Operation performance (by time)", OperationsPerformanceInformationUtil.format(performanceInformation, new AbstractStatisticsPrinter.Options(AbstractStatisticsPrinter.Format.TEXT, AbstractStatisticsPrinter.SortBy.TIME), null, null));
}
use of org.javasimon.Split in project midpoint by Evolveum.
the class MidScaleGuiTest method test231editUserTabProjections.
@Test
public void test231editUserTabProjections() {
logger.info(getTestName());
for (int i = 0; i < REPETITION_COUNT; i++) {
tester.startPage(PageUsers.class);
String idTable = "mainForm:table";
tester.assertComponent(idTable, MainObjectListPanel.class);
tester.debugComponentTrees(":rows:.*:cells:3:cell:link");
String id = idTable + ":items:itemsTable:box:tableContainer:table:body:rows:3:cells:3:cell:link";
tester.clickLink(id);
Stopwatch stopwatch = stopwatch("showProjections", "User's projection tab");
try (Split ignored = stopwatch.start()) {
queryListener.start();
clickOnDetailsMenu(1, com.evolveum.midpoint.gui.impl.page.admin.user.PageUser.class);
}
}
queryListener.dumpAndStop();
tester.assertRenderedPage(com.evolveum.midpoint.gui.impl.page.admin.user.PageUser.class);
OperationsPerformanceInformationType performanceInformation = OperationsPerformanceInformationUtil.toOperationsPerformanceInformationType(OperationsPerformanceMonitor.INSTANCE.getGlobalPerformanceInformation());
displayValue("Operation performance (by name)", OperationsPerformanceInformationUtil.format(performanceInformation));
displayValue("Operation performance (by time)", OperationsPerformanceInformationUtil.format(performanceInformation, new AbstractStatisticsPrinter.Options(AbstractStatisticsPrinter.Format.TEXT, AbstractStatisticsPrinter.SortBy.TIME), null, null));
}
use of org.javasimon.Split in project midpoint by Evolveum.
the class MidScaleRepoTest method test611AddPeakShadows.
@Test
public void test611AddPeakShadows() throws ObjectAlreadyExistsException, 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);
}
}
}
// no query listener in this test
}
Aggregations