• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <hwext/gtest-ext.h>
17 #include <hwext/gtest-tag.h>
18 
19 #include "filter_filter.h"
20 #include "measure_filter.h"
21 #include "process_filter.h"
22 #include "slice_filter.h"
23 #include "trace_streamer_selector.h"
24 
25 using namespace testing::ext;
26 using namespace SysTuning::TraceStreamer;
27 namespace SysTuning {
28 namespace TraceStreamer {
29 class SliceFilterTest : public ::testing::Test {
30 public:
SetUp()31     void SetUp()
32     {
33         stream_.InitFilter();
34     }
35 
TearDown()36     void TearDown() {}
37 
38 public:
39     TraceStreamerSelector stream_;
40 };
41 
42 /**
43  * @tc.name: SliceTestOnceCall
44  * @tc.desc: Parse once method call stack
45  * @tc.type: FUNC
46  */
47 HWTEST_F(SliceFilterTest, SliceTestOnceCall, TestSize.Level1)
48 {
49     TS_LOGI("test28-1");
50     uint64_t ts = 168758662957000;
51     uint64_t ts2 = 168758663011000;
52 
53     uint32_t pid1 = 2532;
54     uint32_t threadGroupId1 = 2519;
55     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
56     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("call_function_one");
57     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts, pid1, threadGroupId1, cat, splitStrIndex);
58     stream_.streamFilters_->sliceFilter_->EndSlice(ts2, pid1, threadGroupId1);
59     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
60     EXPECT_TRUE(slices->Size() == 1);
61     EXPECT_TRUE(slices->DursData()[0] == ts2 - ts);
62 }
63 
64 /**
65  * @tc.name: SliceTestNestedTwoMethod
66  * @tc.desc: Parse Nested call stack of two methods
67  * @tc.type: FUNC
68  */
69 HWTEST_F(SliceFilterTest, SliceTestNestedTwoMethod, TestSize.Level1)
70 {
71     TS_LOGI("test28-2");
72     uint64_t ts1 = 168758670506000;
73     uint32_t pid1 = 1298;
74     uint32_t threadGroupId1 = 1298;
75     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
76     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("call_function_one");
77     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts1, pid1, threadGroupId1, cat, splitStrIndex);
78     splitStrIndex = stream_.traceDataCache_->GetDataIndex("call_function_two");
79     uint64_t ts2 = 168758670523000;
80     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts2, pid1, threadGroupId1, cat, splitStrIndex);
81     uint64_t ts3 = 168758670720000;
82     stream_.streamFilters_->sliceFilter_->EndSlice(ts3, pid1, threadGroupId1);
83     uint64_t ts4 = 168758670732000;
84     stream_.streamFilters_->sliceFilter_->EndSlice(ts4, pid1, threadGroupId1);
85     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
86     EXPECT_TRUE(slices->Size() == 2);
87     EXPECT_TRUE(slices->DursData()[0] == ts4 - ts1);
88     EXPECT_TRUE(slices->DursData()[1] == ts3 - ts2);
89     EXPECT_TRUE(slices->Depths()[1] == 1);
90 }
91 
92 /**
93  * @tc.name: SliceTestNestedTwoMethodStackAndOneMethodStack
94  * @tc.desc: Parse Nested call stack of two methods and one method call stack
95  * @tc.type: FUNC
96  */
97 HWTEST_F(SliceFilterTest, SliceTestNestedTwoMethodStackAndOneMethodStack, TestSize.Level1)
98 {
99     TS_LOGI("test28-3");
100     uint64_t ts1 = 168758663018000;
101     uint32_t pid1 = 2532;
102     uint32_t threadGroupId1 = 2519;
103     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
104     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_one");
105     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts1, pid1, threadGroupId1, cat, splitStrIndex); // slice 0
106     splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_one");
107     uint64_t ts2 = 168758663028000;
108     uint32_t pid2 = 2533;
109     uint32_t threadGroupId2 = 2529;
110     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts2, pid2, threadGroupId2, cat, splitStrIndex);
111     splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_two");
112     uint64_t ts3 = 168758679303000;
113     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts3, pid1, threadGroupId1, cat, splitStrIndex); // slice 2
114     // end thread_one_call_function_two
115     uint64_t ts4 = 168758682466000;
116     stream_.streamFilters_->sliceFilter_->EndSlice(ts4, pid1, threadGroupId1);
117     // end thread_one_call_function_one
118     uint64_t ts5 = 168758682476000;
119     stream_.streamFilters_->sliceFilter_->EndSlice(ts5, pid1, threadGroupId1);
120     // end thread_two_call_function_one slice 1
121     uint64_t ts6 = 168758689323000;
122     stream_.streamFilters_->sliceFilter_->EndSlice(ts6, pid2, threadGroupId2);
123     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
124     EXPECT_TRUE(slices->Size() == 3);
125     EXPECT_TRUE(slices->DursData()[0] == ts5 - ts1); // slice 0
126     EXPECT_TRUE(slices->Depths()[0] == 0);
127     EXPECT_TRUE(slices->DursData()[1] == ts6 - ts2); // slice 1
128     EXPECT_TRUE(slices->Depths()[1] == 0);
129     EXPECT_TRUE(slices->DursData()[2] == ts4 - ts3); // slice 2
130     EXPECT_TRUE(slices->Depths()[2] == 1);
131 }
132 
133 /**
134  * @tc.name: SliceTestWithoutBeginSlice
135  * @tc.desc: Test EndSlice without BeginSlice
136  * @tc.type: FUNC
137  */
138 HWTEST_F(SliceFilterTest, SliceTestWithoutBeginSlice, TestSize.Level1)
139 {
140     TS_LOGI("test28-4");
141     uint64_t ts1 = 168758663018000;
142     uint32_t pid1 = 2532;
143     uint32_t threadGroupId1 = 2519;
144     stream_.streamFilters_->sliceFilter_->EndSlice(ts1, pid1, threadGroupId1);
145     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
146     EXPECT_TRUE(slices->Size() == 0);
147 }
148 
149 /**
150  * @tc.name: SliceTestWithMultiNestedCall
151  * @tc.desc: Parse multi nested call stack
152  * @tc.type: FUNC
153  */
154 HWTEST_F(SliceFilterTest, SliceTestWithMultiNestedCall, TestSize.Level1)
155 {
156     TS_LOGI("test28-5");
157     uint64_t ts1 = 168758663018000;
158     uint32_t pid1 = 2532;
159     uint32_t threadGroupId1 = 2519;
160     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
161     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_one");
162     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts1, pid1, threadGroupId1, cat, splitStrIndex); // slice 0
163     splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_one");
164     uint64_t ts2 = 168758663028000;
165     uint32_t pid2 = 2533;
166     uint32_t threadGroupId2 = 2529;
167     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts2, pid2, threadGroupId2, cat, splitStrIndex);
168     splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_two");
169     uint64_t ts3 = 168758679303000;
170     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts3, pid1, threadGroupId1, cat, splitStrIndex); // slice 2
171     splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_two");
172     uint64_t ts4 = 168758679312000;
173     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts4, pid2, threadGroupId2, cat, splitStrIndex);
174     splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_three");
175     uint64_t ts5 = 168758679313000;
176     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts5, pid1, threadGroupId1, cat, splitStrIndex); // slice 4
177     splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_three");
178     uint64_t ts6 = 168758679323000;
179     stream_.streamFilters_->sliceFilter_->BeginSlice("comm", ts6, pid2, threadGroupId2, cat, splitStrIndex);
180     // end thread_one_call_function_three
181     uint64_t ts7 = 168758682456000;
182     stream_.streamFilters_->sliceFilter_->EndSlice(ts7, pid1, threadGroupId1);
183     // end thread_one_call_function_two
184     uint64_t ts8 = 168758682466000;
185     stream_.streamFilters_->sliceFilter_->EndSlice(ts8, pid1, threadGroupId1);
186     // end thread_one_call_function_one
187     uint64_t ts9 = 168758682476000;
188     stream_.streamFilters_->sliceFilter_->EndSlice(ts9, pid1, threadGroupId1);
189     // end thread_two_call_function_three slice 5
190     uint64_t ts10 = 168758679343000;
191     stream_.streamFilters_->sliceFilter_->EndSlice(ts10, pid2, threadGroupId2);
192     // end thread_two_call_function_two slice 3
193     uint64_t ts11 = 168758679344000;
194     stream_.streamFilters_->sliceFilter_->EndSlice(ts11, pid2, threadGroupId2);
195     // end thread_two_call_function_one slice 1
196     uint64_t ts12 = 168758689323000;
197     stream_.streamFilters_->sliceFilter_->EndSlice(ts12, pid2, threadGroupId2);
198     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
199     EXPECT_TRUE(slices->Size() == 6);
200     EXPECT_TRUE(slices->DursData()[0] == ts9 - ts1); // slice 0
201     EXPECT_TRUE(slices->Depths()[0] == 0);
202     EXPECT_TRUE(slices->DursData()[1] == ts12 - ts2); // slice 1
203     EXPECT_TRUE(slices->Depths()[1] == 0);
204     EXPECT_TRUE(slices->DursData()[2] == ts8 - ts3); // slice 2
205     EXPECT_TRUE(slices->Depths()[2] == 1);
206     EXPECT_TRUE(slices->DursData()[3] == ts11 - ts4); // slice 3
207     EXPECT_TRUE(slices->Depths()[3] == 1);
208     EXPECT_TRUE(slices->DursData()[4] == ts7 - ts5);  // slice 4
209     EXPECT_TRUE(slices->DursData()[5] == ts10 - ts6); // slice 5
210 }
211 
212 /**
213  * @tc.name: AsyncTest
214  * @tc.desc: Test once asynchronous method call stack
215  * @tc.type: FUNC
216  */
217 HWTEST_F(SliceFilterTest, AsyncTest, TestSize.Level1)
218 {
219     TS_LOGI("test28-6");
220     uint64_t ts1 = 168758663018000;
221     uint32_t pid1 = 2532;
222     uint32_t threadGroupId1 = 2519;
223     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
224     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("async_call_function_one");
225     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts1, pid1, threadGroupId1, cat, splitStrIndex); // slice 0
226     splitStrIndex = stream_.traceDataCache_->GetDataIndex("async_call_function_one");
227     // end thread_one_call_function_three
228     uint64_t ts2 = 168758682456000;
229     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts2, pid1, threadGroupId1, cat, splitStrIndex);
230     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
231     EXPECT_TRUE(slices->Size() == 1);
232     EXPECT_TRUE(slices->DursData()[0] == ts2 - ts1); // slice 0
233 }
234 
235 /**
236  * @tc.name: FinishAsyncSliceWithoutStart
237  * @tc.desc: Finish async slice without start
238  * @tc.type: FUNC
239  */
240 HWTEST_F(SliceFilterTest, FinishAsyncSliceWithoutStart, TestSize.Level1)
241 {
242     TS_LOGI("test28-7");
243     uint64_t ts = 100;
244     uint32_t pid = 2532;
245     uint32_t threadGroupId = 2519;
246     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
247     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("async_call_function_one");
248     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts, pid, threadGroupId, cat, splitStrIndex);
249     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
250     EXPECT_TRUE(slices->Size() == 0);
251 }
252 
253 /**
254  * @tc.name: AsyncTestTwiceCallStack
255  * @tc.desc: Test Twice asynchronous call stack
256  * @tc.type: FUNC
257  */
258 HWTEST_F(SliceFilterTest, AsyncTestTwiceCallStack, TestSize.Level1)
259 {
260     TS_LOGI("test28-8");
261     uint64_t ts1 = 168758663018000;
262     uint32_t pid1 = 2532;
263     uint32_t threadGroupId1 = 2519;
264     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
265     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_one");
266     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts1, pid1, threadGroupId1, cat, splitStrIndex); // slice 0
267     DataIndex splitStrIndex2 = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_one");
268     uint64_t ts2 = 168758663028000;
269     uint32_t pid2 = 2533;
270     uint32_t threadGroupId2 = 2529;
271     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts2, pid2, threadGroupId2, cat, splitStrIndex2);
272     // end thread_one_call_function_three
273     uint64_t ts3 = 168758682456000;
274     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts3, pid1, threadGroupId1, cat, splitStrIndex);
275     // end thread_two_call_function_three slice 5
276     uint64_t ts4 = 168758679343000;
277     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts4, pid2, threadGroupId2, cat, splitStrIndex2);
278     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
279     EXPECT_TRUE(slices->Size() == 2);
280     EXPECT_TRUE(slices->DursData()[0] == ts3 - ts1); // slice 0
281     EXPECT_TRUE(slices->Depths()[0] == 0);
282     EXPECT_TRUE(slices->DursData()[1] == ts4 - ts2); // slice 1
283 }
284 
285 /**
286  * @tc.name: BeginAsyncSliceThreeTimes
287  * @tc.desc: Test asynchronous call three times
288  * @tc.type: FUNC
289  */
290 HWTEST_F(SliceFilterTest, BeginAsyncSliceThreeTimes, TestSize.Level1)
291 {
292     TS_LOGI("test28-9");
293     uint64_t ts1 = 168758663018000;
294     uint32_t pid1 = 2532;
295     uint32_t threadGroupId1 = 2519;
296     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
297     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_one");
298     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts1, pid1, threadGroupId1, cat, splitStrIndex); // slice 0
299     DataIndex splitStrIndex2 = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_one");
300     uint64_t ts2 = 168758663028000;
301     uint32_t pid2 = 2533;
302     uint32_t threadGroupId2 = 2529;
303     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts2, pid2, threadGroupId2, cat, splitStrIndex2);
304     DataIndex splitStrIndex3 = stream_.traceDataCache_->GetDataIndex("thread_three_call_function_two");
305     DataIndex cat2 = stream_.traceDataCache_->GetDataIndex("Catalog2");
306     uint64_t ts3 = 168758679303000;
307     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts3, pid1, threadGroupId1, cat2, splitStrIndex3); // slice 2
308     // end thread_one_call_function_three
309     uint64_t ts4 = 168758682456000;
310     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts4, pid1, threadGroupId1, cat, splitStrIndex);
311     // end thread_one_call_function_two
312     uint64_t ts5 = 168758682466000;
313     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts5, pid1, threadGroupId1, cat2, splitStrIndex3);
314     // end thread_two_call_function_three slice 5
315     uint64_t ts6 = 168758679343000;
316     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts6, pid2, threadGroupId2, cat, splitStrIndex2);
317     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
318     EXPECT_TRUE(slices->Size() == 3);
319     EXPECT_TRUE(slices->DursData()[0] == ts4 - ts1); // slice 0
320     EXPECT_TRUE(slices->Depths()[0] == 0);
321     EXPECT_TRUE(slices->DursData()[1] == ts6 - ts2); // slice 1
322     EXPECT_TRUE(slices->Depths()[1] == 0);
323     EXPECT_TRUE(slices->DursData()[2] == ts5 - ts3); // slice 2
324 }
325 
326 /**
327  * @tc.name: BeginSliceMultiTimes
328  * @tc.desc: Test asynchronous call muti times
329  * @tc.type: FUNC
330  */
331 HWTEST_F(SliceFilterTest, BeginSliceMultiTimes, TestSize.Level1)
332 {
333     TS_LOGI("test28-10");
334     uint64_t ts1 = 168758663018000;
335     uint32_t pid1 = 2532;
336     uint32_t threadGroupId1 = 2519;
337     DataIndex cat = stream_.traceDataCache_->GetDataIndex("Catalog");
338     DataIndex splitStrIndex = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_one");
339     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts1, pid1, threadGroupId1, cat, splitStrIndex); // slice 0
340 
341     DataIndex splitStrIndex2 = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_one");
342     uint64_t ts2 = 168758663028000;
343     uint32_t pid2 = 2533;
344     uint32_t threadGroupId2 = 2529;
345     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts2, pid2, threadGroupId2, cat, splitStrIndex2); // slice 1
346 
347     DataIndex splitStrIndex3 = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_two");
348     DataIndex cat2 = stream_.traceDataCache_->GetDataIndex("Catalog2");
349     uint64_t ts3 = 168758679303000;
350     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts3, pid1, threadGroupId1, cat2, splitStrIndex3); // slice 2
351 
352     DataIndex splitStrIndex4 = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_two");
353     uint64_t ts4 = 168758679312000;
354     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts4, pid2, threadGroupId2, cat2, splitStrIndex4); // slice 3
355 
356     DataIndex splitStrIndex5 = stream_.traceDataCache_->GetDataIndex("thread_one_call_function_three");
357     uint64_t ts5 = 168758679313000;
358     DataIndex cat3 = stream_.traceDataCache_->GetDataIndex("Catalog3");
359     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts5, pid1, threadGroupId1, cat3, splitStrIndex5); // slice 4
360 
361     DataIndex splitStrIndex6 = stream_.traceDataCache_->GetDataIndex("thread_two_call_function_three");
362     uint64_t ts6 = 168758679323000;
363     stream_.streamFilters_->sliceFilter_->StartAsyncSlice(ts6, pid2, threadGroupId2, cat3, splitStrIndex6); // slice 5
364 
365     // end thread_one_call_function_three
366     uint64_t ts7 = 168758682456000;
367     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts7, pid1, threadGroupId1, cat,
368                                                            splitStrIndex); // end slice 0
369 
370     // end thread_one_call_function_two
371     uint64_t ts8 = 168758682466000;
372     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts8, pid2, threadGroupId2, cat,
373                                                            splitStrIndex2); // end slice 1
374 
375     // end thread_one_call_function_one
376     uint64_t ts9 = 168758682476000;
377     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts9, pid1, threadGroupId1, cat2,
378                                                            splitStrIndex3); // end slice 2
379 
380     // end thread_two_call_function_three slice 5
381     uint64_t ts10 = 168758679343000;
382     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts10, pid2, threadGroupId2, cat2,
383                                                            splitStrIndex4); // end slice 3
384 
385     // end thread_two_call_function_two slice 3
386     uint64_t ts11 = 168758679344000;
387     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts11, pid1, threadGroupId1, cat3,
388                                                            splitStrIndex5); // end slice 4
389 
390     // end thread_two_call_function_one slice 1
391     uint64_t ts12 = 168758689323000;
392     stream_.streamFilters_->sliceFilter_->FinishAsyncSlice(ts12, pid2, threadGroupId2, cat3,
393                                                            splitStrIndex6); // end slice 5
394 
395     auto slices = stream_.traceDataCache_->GetInternalSlicesData();
396     EXPECT_TRUE(slices->Size() == 6);
397     EXPECT_TRUE(slices->DursData()[0] == ts7 - ts1); // slice 0
398     EXPECT_TRUE(slices->Depths()[0] == 0);
399 
400     EXPECT_TRUE(slices->DursData()[1] == ts8 - ts2); // slice 1
401     EXPECT_TRUE(slices->Depths()[1] == 0);
402 
403     EXPECT_TRUE(slices->DursData()[2] == ts9 - ts3); // slice 2
404     EXPECT_TRUE(slices->Depths()[2] == 0);
405 
406     EXPECT_TRUE(slices->DursData()[3] == ts10 - ts4); // slice 3
407     EXPECT_TRUE(slices->Depths()[3] == 0);
408 
409     EXPECT_TRUE(slices->DursData()[4] == ts11 - ts5); // slice 4
410 
411     EXPECT_TRUE(slices->DursData()[5] == ts12 - ts6); // slice 5
412 }
413 } // namespace TraceStreamer
414 } // namespace SysTuning
415