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
.analysis
.os
.linux
.core
.tests
.stubs
.inputoutput
;
12 import java
.util
.HashSet
;
15 import org
.eclipse
.tracecompass
.analysis
.os
.linux
.core
.inputoutput
.Attributes
;
16 import org
.eclipse
.tracecompass
.analysis
.os
.linux
.core
.inputoutput
.StateValues
;
17 import org
.eclipse
.tracecompass
.analysis
.os
.linux
.core
.tests
.stubs
.LinuxTestCase
;
18 import org
.eclipse
.tracecompass
.statesystem
.core
.interval
.ITmfStateInterval
;
19 import org
.eclipse
.tracecompass
.statesystem
.core
.statevalue
.TmfStateValue
;
20 import org
.eclipse
.tracecompass
.statesystem
.core
.tests
.shared
.utils
.StateSystemTestUtils
;
22 import com
.google
.common
.collect
.ImmutableList
;
24 import org
.eclipse
.tracecompass
.statesystem
.core
.tests
.shared
.utils
.StateIntervalStub
;
27 * Factory of test for the input output analysis
29 * @author Geneviève Bastien
31 public final class IoTestFactory
{
33 private static final String DEVICE_ID
= "8388624";
34 private static final String DEVICE_NAME
= "sda";
35 private static final String SECOND_DEVICE_ID
= "8388608";
37 private IoTestFactory() {
42 * This test case covers cases of simple requests to disk, insert, issue and
46 * - Write Request inserted at 5L, issued at 10L and completed at 20L
47 * - Two write requests are issued at 25L, one issued at 27L and completed at 30L, the other issued at 29L and completed at 35L
48 * - Read request inserted at 40L, issued at 50L and completed at 60L
51 public final static LinuxTestCase SIMPLE_REQUESTS
= new LinuxTestCase("io_analysis.xml") {
54 public Set
<IntervalInfo
> getTestIntervals() {
55 Set
<IntervalInfo
> info
= new HashSet
<>();
57 /* Driver and waiting queue length */
58 ImmutableList
<ITmfStateInterval
> intervals
= ImmutableList
.of(new StateIntervalStub(1, 4, TmfStateValue
.nullValue()),
59 new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(1)),
60 new StateIntervalStub(10, 24, TmfStateValue
.newValueInt(0)),
61 new StateIntervalStub(25, 26, TmfStateValue
.newValueInt(2)),
62 new StateIntervalStub(27, 28, TmfStateValue
.newValueInt(1)),
63 new StateIntervalStub(29, 39, TmfStateValue
.newValueInt(0)),
64 new StateIntervalStub(40, 49, TmfStateValue
.newValueInt(1)),
65 new StateIntervalStub(50, 60, TmfStateValue
.newValueInt(0)));
66 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE_LENGTH
));
68 intervals
= ImmutableList
.of(new StateIntervalStub(1, 4, TmfStateValue
.nullValue()),
69 new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(0)),
70 new StateIntervalStub(10, 19, TmfStateValue
.newValueInt(1)),
71 new StateIntervalStub(20, 26, TmfStateValue
.newValueInt(0)),
72 new StateIntervalStub(27, 28, TmfStateValue
.newValueInt(1)),
73 new StateIntervalStub(29, 29, TmfStateValue
.newValueInt(2)),
74 new StateIntervalStub(30, 34, TmfStateValue
.newValueInt(1)),
75 new StateIntervalStub(35, 49, TmfStateValue
.newValueInt(0)),
76 new StateIntervalStub(50, 59, TmfStateValue
.newValueInt(1)),
77 new StateIntervalStub(60, 60, TmfStateValue
.newValueInt(0)));
78 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE_LENGTH
));
80 /* Bytes read and written */
81 intervals
= ImmutableList
.of(new StateIntervalStub(1, 59, TmfStateValue
.nullValue()),
82 new StateIntervalStub(60, 60, TmfStateValue
.newValueInt(256)));
83 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.SECTORS_READ
));
85 intervals
= ImmutableList
.of(new StateIntervalStub(1, 19, TmfStateValue
.nullValue()),
86 new StateIntervalStub(20, 29, TmfStateValue
.newValueInt(8)),
87 new StateIntervalStub(30, 34, TmfStateValue
.newValueInt(16)),
88 new StateIntervalStub(35, 60, TmfStateValue
.newValueInt(24)));
89 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.SECTORS_WRITTEN
));
91 intervals
= ImmutableList
.of(new StateIntervalStub(1, 60, TmfStateValue
.newValueString(DEVICE_NAME
)));
92 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
));
97 public Set
<PunctualInfo
> getPunctualTestData() {
98 Set
<PunctualInfo
> info
= new HashSet
<>();
100 PunctualInfo oneInfo
= new PunctualInfo(5L);
101 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
102 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(444L));
103 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
106 oneInfo
= new PunctualInfo(10L);
107 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
108 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
109 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
111 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
112 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(444L));
113 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
114 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.newValueInt(0));
117 oneInfo
= new PunctualInfo(20L);
118 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
119 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
120 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
122 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), TmfStateValue
.nullValue());
123 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
124 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
125 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.nullValue());
128 oneInfo
= new PunctualInfo(25L);
129 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
130 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(111L));
131 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
132 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), StateValues
.WRITING_REQUEST_VALUE
);
133 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(222L));
134 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
137 oneInfo
= new PunctualInfo(27L);
138 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
139 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
140 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
141 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), StateValues
.WRITING_REQUEST_VALUE
);
142 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(222L));
143 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
145 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
146 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(111L));
147 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
148 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.newValueInt(0));
151 oneInfo
= new PunctualInfo(29L);
152 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
153 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
154 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
155 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), TmfStateValue
.nullValue());
156 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
157 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
159 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
160 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(111L));
161 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
162 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.newValueInt(0));
163 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1"), StateValues
.WRITING_REQUEST_VALUE
);
164 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(222L));
165 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
166 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.ISSUED_FROM
), TmfStateValue
.newValueInt(1));
169 oneInfo
= new PunctualInfo(30L);
170 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
171 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
172 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
173 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), TmfStateValue
.nullValue());
174 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
175 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
177 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), TmfStateValue
.nullValue());
178 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
179 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
180 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.nullValue());
181 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1"), StateValues
.WRITING_REQUEST_VALUE
);
182 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(222L));
183 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
184 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.ISSUED_FROM
), TmfStateValue
.newValueInt(1));
187 oneInfo
= new PunctualInfo(35L);
188 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
189 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
190 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
191 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), TmfStateValue
.nullValue());
192 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
193 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
194 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), TmfStateValue
.nullValue());
195 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
196 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
197 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.nullValue());
198 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1"), TmfStateValue
.nullValue());
199 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
200 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
201 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "1", Attributes
.ISSUED_FROM
), TmfStateValue
.nullValue());
204 oneInfo
= new PunctualInfo(40L);
205 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.READING_REQUEST_VALUE
);
206 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(444L));
207 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(256));
210 oneInfo
= new PunctualInfo(50L);
211 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
212 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
213 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
215 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), StateValues
.READING_REQUEST_VALUE
);
216 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(444L));
217 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(256));
218 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.newValueInt(0));
221 oneInfo
= new PunctualInfo(60L);
222 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
223 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
224 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
226 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), TmfStateValue
.nullValue());
227 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
228 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
229 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.nullValue());
238 * This test case tests the behavior of a simple request without the device
242 * - Write Request inserted at 5L, issued at 10L and completed at 20L
245 public final static LinuxTestCase SIMPLE_NO_STATEDUMP
= new LinuxTestCase("io_nostatedump.xml") {
248 public Set
<IntervalInfo
> getTestIntervals() {
249 Set
<IntervalInfo
> info
= new HashSet
<>();
251 /* Driver and waiting queue length */
252 ImmutableList
<ITmfStateInterval
> intervals
= ImmutableList
.of(new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(1)),
253 new StateIntervalStub(10, 20, TmfStateValue
.newValueInt(0)));
254 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE_LENGTH
));
256 intervals
= ImmutableList
.of(new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(0)),
257 new StateIntervalStub(10, 19, TmfStateValue
.newValueInt(1)),
258 new StateIntervalStub(20, 20, TmfStateValue
.newValueInt(0)));
259 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE_LENGTH
));
265 public Set
<PunctualInfo
> getPunctualTestData() {
266 return new HashSet
<>();
271 * This test case contains system call read events
273 public final static LinuxTestCase SYSCALL_READ
= new LinuxTestCase("io_syscall_read.xml") {
276 public Set
<IntervalInfo
> getTestIntervals() {
277 Set
<IntervalInfo
> info
= new HashSet
<>();
279 /* Bytes read for a given process */
280 ImmutableList
<ITmfStateInterval
> intervals
= ImmutableList
.of(new StateIntervalStub(1, 9, TmfStateValue
.nullValue()),
281 new StateIntervalStub(10, 24, TmfStateValue
.newValueInt(8)),
282 new StateIntervalStub(25, 50, TmfStateValue
.newValueInt(44)));
283 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "2", Attributes
.BYTES_READ
));
285 /* Bytes read for a given process */
286 intervals
= ImmutableList
.of(new StateIntervalStub(1, 49, TmfStateValue
.nullValue()),
287 new StateIntervalStub(50, 50, TmfStateValue
.newValueInt(8)));
288 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "5", Attributes
.BYTES_READ
));
294 public Set
<PunctualInfo
> getPunctualTestData() {
295 return new HashSet
<>();
300 * This test case contains system call write events
302 public final static LinuxTestCase SYSCALL_WRITE
= new LinuxTestCase("io_syscall_write.xml") {
305 public Set
<IntervalInfo
> getTestIntervals() {
306 Set
<IntervalInfo
> info
= new HashSet
<>();
308 /* Bytes read for a given process */
309 ImmutableList
<ITmfStateInterval
> intervals
= ImmutableList
.of(new StateIntervalStub(1, 9, TmfStateValue
.nullValue()),
310 new StateIntervalStub(10, 29, TmfStateValue
.newValueInt(16)),
311 new StateIntervalStub(30, 39, TmfStateValue
.newValueInt(26)),
312 new StateIntervalStub(40, 50, TmfStateValue
.newValueInt(36)));
313 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "2", Attributes
.BYTES_WRITTEN
));
315 /* Bytes read for a given process */
316 intervals
= ImmutableList
.of(new StateIntervalStub(1, 29, TmfStateValue
.nullValue()),
317 new StateIntervalStub(30, 49, TmfStateValue
.newValueInt(32)),
318 new StateIntervalStub(50, 50, TmfStateValue
.newValueInt(96)));
319 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "5", Attributes
.BYTES_WRITTEN
));
325 public Set
<PunctualInfo
> getPunctualTestData() {
326 return new HashSet
<>();
331 * This test case contains requests merges with different events
334 * - Write request inserted at 5L, frontmerged at 7L, issued at 10L and completed 20L
335 * - 4 reqd requests inserted at 15L, 35L, 40L and 50L, merged at 42L, 45L and 55L, issued at 60L and completed at 65L
338 public final static LinuxTestCase REQUESTS_MERGE
= new LinuxTestCase("io_req_merge.xml") {
341 public Set
<IntervalInfo
> getTestIntervals() {
342 Set
<IntervalInfo
> info
= new HashSet
<>();
344 /* Driver and waiting queue length */
345 ImmutableList
<ITmfStateInterval
> intervals
= ImmutableList
.of(new StateIntervalStub(1, 4, TmfStateValue
.nullValue()),
346 new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(1)),
347 new StateIntervalStub(10, 14, TmfStateValue
.newValueInt(0)),
348 new StateIntervalStub(15, 34, TmfStateValue
.newValueInt(1)),
349 new StateIntervalStub(35, 39, TmfStateValue
.newValueInt(2)),
350 new StateIntervalStub(40, 41, TmfStateValue
.newValueInt(3)),
351 new StateIntervalStub(42, 44, TmfStateValue
.newValueInt(2)),
352 new StateIntervalStub(45, 49, TmfStateValue
.newValueInt(1)),
353 new StateIntervalStub(50, 54, TmfStateValue
.newValueInt(2)),
354 new StateIntervalStub(55, 59, TmfStateValue
.newValueInt(1)),
355 new StateIntervalStub(60, 65, TmfStateValue
.newValueInt(0)));
356 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE_LENGTH
));
358 intervals
= ImmutableList
.of(new StateIntervalStub(1, 4, TmfStateValue
.nullValue()),
359 new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(0)),
360 new StateIntervalStub(10, 19, TmfStateValue
.newValueInt(1)),
361 new StateIntervalStub(20, 59, TmfStateValue
.newValueInt(0)),
362 new StateIntervalStub(60, 64, TmfStateValue
.newValueInt(1)),
363 new StateIntervalStub(65, 65, TmfStateValue
.newValueInt(0)));
364 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE_LENGTH
));
366 /* Bytes read and written */
367 intervals
= ImmutableList
.of(new StateIntervalStub(1, 64, TmfStateValue
.nullValue()),
368 new StateIntervalStub(65, 65, TmfStateValue
.newValueInt(40)));
369 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.SECTORS_READ
));
371 intervals
= ImmutableList
.of(new StateIntervalStub(1, 19, TmfStateValue
.nullValue()),
372 new StateIntervalStub(20, 65, TmfStateValue
.newValueInt(16)));
373 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.SECTORS_WRITTEN
));
379 public Set
<PunctualInfo
> getPunctualTestData() {
380 Set
<PunctualInfo
> info
= new HashSet
<>();
382 PunctualInfo oneInfo
= new PunctualInfo(5L);
383 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
384 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(444L));
385 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
388 oneInfo
= new PunctualInfo(7L);
389 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
390 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(436L));
391 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(16));
394 oneInfo
= new PunctualInfo(10L);
395 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
396 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
397 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
398 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
399 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(436L));
400 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(16));
403 oneInfo
= new PunctualInfo(15L);
404 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.READING_REQUEST_VALUE
);
405 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(292L));
406 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
407 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), StateValues
.WRITING_REQUEST_VALUE
);
408 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(436L));
409 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(16));
412 oneInfo
= new PunctualInfo(20L);
413 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), TmfStateValue
.nullValue());
414 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
415 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
418 oneInfo
= new PunctualInfo(35L);
419 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.READING_REQUEST_VALUE
);
420 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(292L));
421 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
422 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), StateValues
.READING_REQUEST_VALUE
);
423 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(284L));
424 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
427 oneInfo
= new PunctualInfo(40L);
428 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.READING_REQUEST_VALUE
);
429 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(292L));
430 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
431 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), StateValues
.READING_REQUEST_VALUE
);
432 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(284L));
433 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
434 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2"), StateValues
.READING_REQUEST_VALUE
);
435 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(300L));
436 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(16));
439 oneInfo
= new PunctualInfo(42L);
440 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.READING_REQUEST_VALUE
);
441 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(292L));
442 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(24));
443 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.MERGED_IN
), TmfStateValue
.nullValue());
444 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), StateValues
.READING_REQUEST_VALUE
);
445 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(284L));
446 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
447 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.MERGED_IN
), TmfStateValue
.nullValue());
448 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2"), TmfStateValue
.nullValue());
449 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
450 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
451 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.MERGED_IN
), TmfStateValue
.newValueInt(0));
454 oneInfo
= new PunctualInfo(45L);
455 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
456 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
457 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
458 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.MERGED_IN
), TmfStateValue
.newValueInt(1));
459 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), StateValues
.READING_REQUEST_VALUE
);
460 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(284L));
461 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(32));
462 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.MERGED_IN
), TmfStateValue
.nullValue());
463 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2"), TmfStateValue
.nullValue());
464 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
465 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
466 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.MERGED_IN
), TmfStateValue
.newValueInt(0));
469 oneInfo
= new PunctualInfo(50L);
470 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), StateValues
.READING_REQUEST_VALUE
);
471 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(316L));
472 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(8));
473 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.MERGED_IN
), TmfStateValue
.nullValue());
474 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), StateValues
.READING_REQUEST_VALUE
);
475 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(284L));
476 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(32));
477 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.MERGED_IN
), TmfStateValue
.nullValue());
478 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2"), TmfStateValue
.nullValue());
479 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
480 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
481 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.MERGED_IN
), TmfStateValue
.newValueInt(0));
484 oneInfo
= new PunctualInfo(55L);
485 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
486 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
487 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
488 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.MERGED_IN
), TmfStateValue
.newValueInt(1));
489 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), StateValues
.READING_REQUEST_VALUE
);
490 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(284L));
491 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(40));
492 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.MERGED_IN
), TmfStateValue
.nullValue());
493 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2"), TmfStateValue
.nullValue());
494 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
495 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
496 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.MERGED_IN
), TmfStateValue
.newValueInt(0));
499 oneInfo
= new PunctualInfo(60L);
500 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0"), TmfStateValue
.nullValue());
501 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
502 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
503 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1"), TmfStateValue
.nullValue());
504 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
505 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "1", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
506 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2"), TmfStateValue
.nullValue());
507 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
508 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE
, "2", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
510 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), StateValues
.READING_REQUEST_VALUE
);
511 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.newValueLong(284L));
512 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.newValueInt(40));
513 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.newValueInt(1));
516 oneInfo
= new PunctualInfo(65L);
517 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0"), TmfStateValue
.nullValue());
518 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.CURRENT_REQUEST
), TmfStateValue
.nullValue());
519 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.REQUEST_SIZE
), TmfStateValue
.nullValue());
520 oneInfo
.addValue(StateSystemTestUtils
.makeAttribute(Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE
, "0", Attributes
.ISSUED_FROM
), TmfStateValue
.nullValue());
528 * This test case contains special cases when some events are missed (no
529 * insert, no issue, merge without prior insertion)
532 * - write request issued at 5L and completed at 10L
533 * * expected: See the request in the issue queue
534 * - frontmerge with a request that was not inserted at 15L, issued 20L, completed 25L
535 * * expected: See only that one request with the right sector, issued and completed normally
536 * - read request completed at 30L, never insert or issued
537 * * expected: Sectors added to the total of read sectors
538 * - elv_merge after a request not inserted: insert at 35, merge at 38, issued at 40, completed at 45
539 * * expected: See only one request with the right sector, issued and completed normally
540 * - elv merge before a request not inserted: insert at 50, merge at 55, issued at 60 and completed at 65
541 * * expected: See only one request with the right sector, issued and completed normally
542 * - request that does not complete: insert at 80, issued at 100
543 * * expected: have an open request in the driving queue until the end
544 * - request that is not issued: insert at 120, completed at 140
545 * * expected: have an open request in the waiting queue until the end, written sectors at completion are counted
548 public final static LinuxTestCase REQUESTS_MISSING
= new LinuxTestCase("io_missing.xml") {
551 public Set
<IntervalInfo
> getTestIntervals() {
552 Set
<IntervalInfo
> info
= new HashSet
<>();
554 /* Driver and waiting queue length */
555 ImmutableList
<ITmfStateInterval
> intervals
= ImmutableList
.of(new StateIntervalStub(1, 4, TmfStateValue
.nullValue()),
556 new StateIntervalStub(5, 14, TmfStateValue
.newValueInt(0)),
557 new StateIntervalStub(15, 19, TmfStateValue
.newValueInt(1)),
558 new StateIntervalStub(20, 34, TmfStateValue
.newValueInt(0)),
559 new StateIntervalStub(35, 39, TmfStateValue
.newValueInt(1)),
560 new StateIntervalStub(40, 49, TmfStateValue
.newValueInt(0)),
561 new StateIntervalStub(50, 59, TmfStateValue
.newValueInt(1)),
562 new StateIntervalStub(60, 79, TmfStateValue
.newValueInt(0)),
563 new StateIntervalStub(80, 99, TmfStateValue
.newValueInt(1)),
564 new StateIntervalStub(100, 119, TmfStateValue
.newValueInt(0)),
565 new StateIntervalStub(120, 140, TmfStateValue
.newValueInt(1)));
566 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE_LENGTH
));
568 intervals
= ImmutableList
.of(new StateIntervalStub(1, 4, TmfStateValue
.nullValue()),
569 new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(1)),
570 new StateIntervalStub(10, 19, TmfStateValue
.newValueInt(0)),
571 new StateIntervalStub(20, 24, TmfStateValue
.newValueInt(1)),
572 new StateIntervalStub(25, 39, TmfStateValue
.newValueInt(0)),
573 new StateIntervalStub(40, 44, TmfStateValue
.newValueInt(1)),
574 new StateIntervalStub(45, 59, TmfStateValue
.newValueInt(0)),
575 new StateIntervalStub(60, 64, TmfStateValue
.newValueInt(1)),
576 new StateIntervalStub(65, 99, TmfStateValue
.newValueInt(0)),
577 new StateIntervalStub(100, 140, TmfStateValue
.newValueInt(1)));
578 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE_LENGTH
));
580 /* Bytes read and written */
581 intervals
= ImmutableList
.of(new StateIntervalStub(1, 29, TmfStateValue
.nullValue()),
582 new StateIntervalStub(30, 44, TmfStateValue
.newValueInt(16)),
583 new StateIntervalStub(45, 64, TmfStateValue
.newValueInt(56)),
584 new StateIntervalStub(65, 140, TmfStateValue
.newValueInt(96)));
585 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.SECTORS_READ
));
587 intervals
= ImmutableList
.of(new StateIntervalStub(1, 9, TmfStateValue
.nullValue()),
588 new StateIntervalStub(10, 24, TmfStateValue
.newValueInt(8)),
589 new StateIntervalStub(25, 139, TmfStateValue
.newValueInt(24)),
590 new StateIntervalStub(140, 140, TmfStateValue
.newValueInt(32)));
591 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.SECTORS_WRITTEN
));
597 public Set
<PunctualInfo
> getPunctualTestData() {
598 return new HashSet
<>();
603 * This test case tests that requests are associated with the right device
606 * - write request on sda inserted at 5L, issued at 10L and completed at 20L
607 * - read request on sdb inserted at 8L (before statedump), issued at 12L and completed at 18L
610 public final static LinuxTestCase TWO_DEVICES
= new LinuxTestCase("io_two_devices.xml") {
613 public Set
<IntervalInfo
> getTestIntervals() {
614 Set
<IntervalInfo
> info
= new HashSet
<>();
616 /* Driver and waiting queue length */
617 ImmutableList
<ITmfStateInterval
> intervals
= ImmutableList
.of(new StateIntervalStub(1, 4, TmfStateValue
.nullValue()),
618 new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(1)),
619 new StateIntervalStub(10, 20, TmfStateValue
.newValueInt(0)));
620 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.WAITING_QUEUE_LENGTH
));
622 intervals
= ImmutableList
.of(new StateIntervalStub(1, 4, TmfStateValue
.nullValue()),
623 new StateIntervalStub(5, 9, TmfStateValue
.newValueInt(0)),
624 new StateIntervalStub(10, 19, TmfStateValue
.newValueInt(1)),
625 new StateIntervalStub(20, 20, TmfStateValue
.newValueInt(0)));
626 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.DRIVER_QUEUE_LENGTH
));
628 /* Bytes read and written */
629 intervals
= ImmutableList
.of(new StateIntervalStub(1, 20, TmfStateValue
.nullValue()));
630 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.SECTORS_READ
));
632 intervals
= ImmutableList
.of(new StateIntervalStub(1, 19, TmfStateValue
.nullValue()),
633 new StateIntervalStub(20, 20, TmfStateValue
.newValueInt(8)));
634 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, DEVICE_ID
, Attributes
.SECTORS_WRITTEN
));
636 /* Driver and waiting queue length */
637 intervals
= ImmutableList
.of(new StateIntervalStub(1, 7, TmfStateValue
.nullValue()),
638 new StateIntervalStub(8, 11, TmfStateValue
.newValueInt(1)),
639 new StateIntervalStub(12, 20, TmfStateValue
.newValueInt(0)));
640 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, SECOND_DEVICE_ID
, Attributes
.WAITING_QUEUE_LENGTH
));
642 intervals
= ImmutableList
.of(new StateIntervalStub(1, 7, TmfStateValue
.nullValue()),
643 new StateIntervalStub(8, 11, TmfStateValue
.newValueInt(0)),
644 new StateIntervalStub(12, 17, TmfStateValue
.newValueInt(1)),
645 new StateIntervalStub(18, 20, TmfStateValue
.newValueInt(0)));
646 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, SECOND_DEVICE_ID
, Attributes
.DRIVER_QUEUE_LENGTH
));
648 /* Bytes read and written */
649 intervals
= ImmutableList
.of(new StateIntervalStub(1, 17, TmfStateValue
.nullValue()),
650 new StateIntervalStub(18, 20, TmfStateValue
.newValueInt(16)));
651 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, SECOND_DEVICE_ID
, Attributes
.SECTORS_READ
));
653 intervals
= ImmutableList
.of(new StateIntervalStub(1, 20, TmfStateValue
.nullValue()));
654 info
.add(new IntervalInfo(intervals
, Attributes
.DISKS
, SECOND_DEVICE_ID
, Attributes
.SECTORS_WRITTEN
));
660 public Set
<PunctualInfo
> getPunctualTestData() {
661 return new HashSet
<>();
666 * This test case contains system call read and write events but instead of
667 * context with the event, it has sched_switches so that the kernel analysis
668 * has to be used to get the running threads
670 public final static LinuxTestCase SYSCALLS_KERNEL
= new LinuxTestCase("io_full_kernel.xml") {
673 public Set
<IntervalInfo
> getTestIntervals() {
674 Set
<IntervalInfo
> info
= new HashSet
<>();
676 /* Bytes read and written for thread 1 */
677 ImmutableList
<ITmfStateInterval
> intervals
= ImmutableList
.of(new StateIntervalStub(1, 29, TmfStateValue
.nullValue()),
678 new StateIntervalStub(30, 45, TmfStateValue
.newValueInt(20)));
679 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "1", Attributes
.BYTES_READ
));
681 intervals
= ImmutableList
.of(new StateIntervalStub(1, 45, TmfStateValue
.nullValue()));
682 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "1", Attributes
.BYTES_WRITTEN
));
684 /* Bytes read and written for thread 2 */
685 intervals
= ImmutableList
.of(new StateIntervalStub(1, 9, TmfStateValue
.nullValue()),
686 new StateIntervalStub(10, 45, TmfStateValue
.newValueInt(8)));
687 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "2", Attributes
.BYTES_READ
));
689 intervals
= ImmutableList
.of(new StateIntervalStub(1, 45, TmfStateValue
.nullValue()));
690 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "2", Attributes
.BYTES_WRITTEN
));
692 /* Bytes read and written for thread 3 */
693 intervals
= ImmutableList
.of(new StateIntervalStub(1, 34, TmfStateValue
.nullValue()),
694 new StateIntervalStub(35, 45, TmfStateValue
.newValueInt(36)));
695 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "3", Attributes
.BYTES_READ
));
697 intervals
= ImmutableList
.of(new StateIntervalStub(1, 39, TmfStateValue
.nullValue()),
698 new StateIntervalStub(40, 45, TmfStateValue
.newValueInt(64)));
699 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "3", Attributes
.BYTES_WRITTEN
));
701 /* Bytes read and written for thread 4 */
702 intervals
= ImmutableList
.of(new StateIntervalStub(1, 45, TmfStateValue
.nullValue()));
703 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "4", Attributes
.BYTES_READ
));
705 intervals
= ImmutableList
.of(new StateIntervalStub(1, 9, TmfStateValue
.nullValue()),
706 new StateIntervalStub(10, 45, TmfStateValue
.newValueInt(16)));
707 info
.add(new IntervalInfo(intervals
, Attributes
.THREADS
, "4", Attributes
.BYTES_WRITTEN
));
713 public Set
<PunctualInfo
> getPunctualTestData() {
714 return new HashSet
<>();