1 /*******************************************************************************
2 * Copyright (c) 2016 École Polytechnique de Montréal
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.lttng2
.kernel
.ui
.swtbot
.tests
.perf
;
12 import java
.io
.IOException
;
13 import java
.util
.EnumSet
;
15 import org
.eclipse
.core
.runtime
.FileLocator
;
16 import org
.eclipse
.swtbot
.swt
.finder
.junit
.SWTBotJunit4ClassRunner
;
17 import org
.eclipse
.tracecompass
.analysis
.os
.linux
.ui
.swtbot
.tests
.perf
.views
.UiResponseTest
;
18 import org
.eclipse
.tracecompass
.internal
.lttng2
.kernel
.ui
.views
.PerspectiveFactory
;
19 import org
.eclipse
.tracecompass
.testtraces
.ctf
.CtfTestTrace
;
20 import org
.eclipse
.tracecompass
.tmf
.ui
.swtbot
.tests
.shared
.SWTBotUtils
;
21 import org
.junit
.Test
;
22 import org
.junit
.runner
.RunWith
;
25 * Test the responsiveness of Control Flow View and Resources View for different
26 * traces and scenarios. Ideally, when running this test, JUL logging should be
27 * enabled using a logger.properties file. LTTng JUL handler is advised since it
28 * works better with multi-threaded applications than other log handlers
30 * @author Geneviève Bastien
32 @RunWith(SWTBotJunit4ClassRunner
.class)
33 public class LttngUiResponseBenchmark
extends UiResponseTest
{
35 private static final String TRACE_TYPE
= "org.eclipse.linuxtools.lttng2.kernel.tracetype";
38 protected void prepareWorkspace() {
39 /* Switch to kernel perspective */
40 SWTBotUtils
.switchToPerspective(PerspectiveFactory
.ID
);
44 * Test with the django trace
46 * @throws SecurityException
47 * If a security manager is present and any the wrong class is
48 * loaded or the class loader is not the same as its ancestor's
50 * @throws IllegalArgumentException
51 * the object is not the correct class type
53 * Exceptions with the trace file
56 public void testWithDjango() throws SecurityException
, IllegalArgumentException
, IOException
{
57 runTestWithTrace(FileLocator
.toFileURL(CtfTestTrace
.DJANGO_CLIENT
.getTraceURL()).getPath(), TRACE_TYPE
, EnumSet
.allOf(OsLinuxViews
.class));
61 * Test with the many-threads trace
63 * @throws SecurityException
64 * If a security manager is present and any the wrong class is
65 * loaded or the class loader is not the same as its ancestor's
67 * @throws IllegalArgumentException
68 * the object is not the correct class type
70 * Exceptions with the trace file
74 public void testWithManyThreads() throws SecurityException
, IllegalArgumentException
, IOException
{
75 runTestWithTrace(FileLocator
.toFileURL(CtfTestTrace
.MANY_THREADS
.getTraceURL()).getPath(), TRACE_TYPE
, EnumSet
.of(OsLinuxViews
.CONTROL_FLOW
, OsLinuxViews
.RESOURCES
, OsLinuxViews
.CPU_USAGE
, OsLinuxViews
.DISK_IO_ACTIVITY
));
This page took 0.035025 seconds and 6 git commands to generate.