Commit | Line | Data |
---|---|---|
a4f6f73b MAL |
1 | /****************************************************************************** |
2 | * Copyright (c) 2016 Ericsson | |
3 | * | |
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 | *******************************************************************************/ | |
9 | ||
10 | package org.eclipse.tracecompass.integration.swtbot.tests.projectexplorer; | |
11 | ||
12 | /** | |
13 | * A helper class to store information about a test trace. | |
14 | */ | |
15 | public class TestTraceInfo { | |
16 | private final String fTraceName; | |
17 | private final String fTracePath; | |
18 | private final String fTraceType; | |
19 | private final long fNbEvents; | |
20 | private final String fFirstEventTimestamp; | |
21 | ||
22 | /** | |
23 | * | |
24 | * @param traceName | |
25 | * the name of the trace | |
26 | * @param traceType | |
27 | * the trace type (Category with name format) | |
28 | * @param nbEvents | |
29 | * the number of events in the trace | |
30 | * @param firstEventTimestamp | |
31 | * he first event timestamp in string form. See | |
32 | * {@link #getFirstEventTimestamp()} | |
33 | */ | |
34 | public TestTraceInfo(String traceName, String traceType, long nbEvents, String firstEventTimestamp) { | |
35 | this(traceName, traceName, traceType, nbEvents, firstEventTimestamp); | |
36 | } | |
37 | ||
38 | /** | |
39 | * | |
40 | * @param traceName | |
41 | * the name of the trace | |
42 | * @param tracePath | |
43 | * the path of the trace. Whether or not this is absolute or | |
44 | * relative is up to the client. | |
45 | * @param traceType | |
46 | * the trace type (Category with name format) | |
47 | * @param nbEvents | |
48 | * the number of events in the trace | |
49 | * @param firstEventTimestamp | |
50 | * he first event timestamp in string form. See | |
51 | * {@link #getFirstEventTimestamp()} | |
52 | */ | |
53 | public TestTraceInfo(String traceName, String tracePath, String traceType, long nbEvents, String firstEventTimestamp) { | |
54 | fTraceName = traceName; | |
55 | fTracePath = tracePath; | |
56 | fTraceType = traceType; | |
57 | fNbEvents = nbEvents; | |
58 | fFirstEventTimestamp = firstEventTimestamp; | |
59 | } | |
60 | ||
61 | /** | |
62 | * @return the name of the trace | |
63 | */ | |
64 | public String getTraceName() { | |
65 | return fTraceName; | |
66 | } | |
67 | ||
68 | /** | |
69 | * @return the path of the trace. Whether or not this is absolute or relative is up to the client. | |
70 | */ | |
71 | public String getTracePath() { | |
72 | return fTracePath; | |
73 | } | |
74 | ||
75 | /** | |
76 | * @return the trace type (Category with name format) | |
77 | */ | |
78 | public String getTraceType() { | |
79 | return fTraceType; | |
80 | } | |
81 | ||
82 | /** | |
83 | * @return the number of events in the trace | |
84 | */ | |
85 | public long getNbEvents() { | |
86 | return fNbEvents; | |
87 | } | |
88 | ||
89 | /** | |
90 | * The first event timestamp in string form. Tests use this to see if the | |
91 | * cell contains this text (String.contains()). Since there can be timezone | |
92 | * issues with hours and days, this value should only specify minutes and | |
93 | * more precise digits. For example: 04:32.650 993 664 | |
94 | * | |
95 | * @return the first event timestamp in string form | |
96 | */ | |
97 | public String getFirstEventTimestamp() { | |
98 | return fFirstEventTimestamp; | |
99 | } | |
100 | } |