ArmNN  NotReleased
TimelineUtilityMethodsTests.cpp File Reference
#include "ProfilingMocks.hpp"
#include "ProfilingTestUtils.hpp"
#include <SendTimelinePacket.hpp>
#include <TimelineUtilityMethods.hpp>
#include <LabelsAndEventClasses.hpp>
#include <ProfilingService.hpp>
#include <memory>
#include <boost/test/unit_test.hpp>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (CreateTypedLabelTest)
 
 BOOST_AUTO_TEST_CASE (SendWellKnownLabelsAndEventClassesTest)
 
 BOOST_AUTO_TEST_CASE (CreateNamedTypedChildEntityTest)
 
 BOOST_AUTO_TEST_CASE (DeclareLabelTest)
 
 BOOST_AUTO_TEST_CASE (CreateNameTypeEntityInvalidTest)
 
 BOOST_AUTO_TEST_CASE (CreateNameTypeEntityTest)
 
 BOOST_AUTO_TEST_CASE (RecordEventTest)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/7]

BOOST_AUTO_TEST_CASE ( CreateTypedLabelTest  )

Definition at line 23 of file TimelineUtilityMethodsTests.cpp.

References BOOST_CHECK(), MockBufferManager::GetReadableBuffer(), ProfilingService::Instance(), armnn::profiling::LabelLink, MockBufferManager::MarkRead(), ProfilingService::NextGuid(), VerifyTimelineLabelBinaryPacket(), and VerifyTimelineRelationshipBinaryPacket().

24 {
25  MockBufferManager mockBufferManager(1024);
26  std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
27  TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
28 
29  // Generate first guid to ensure that the named typed entity guid is not 0 on local single test.
30  ProfilingService::Instance().NextGuid();
31 
32  ProfilingGuid entityGuid(123);
33  const std::string entityName = "some entity";
34  ProfilingStaticGuid labelTypeGuid(456);
35 
36  BOOST_CHECK_NO_THROW(timelineUtilityMethods.MarkEntityWithLabel(entityGuid, entityName, labelTypeGuid));
37 
38  // Commit all packets at once
39  timelineUtilityMethods.Commit();
40 
41  // Get the readable buffer
42  auto readableBuffer = mockBufferManager.GetReadableBuffer();
43  BOOST_CHECK(readableBuffer != nullptr);
44  unsigned int size = readableBuffer->GetSize();
45  BOOST_CHECK(size == 116);
46  const unsigned char* readableData = readableBuffer->GetReadableData();
47  BOOST_CHECK(readableData != nullptr);
48 
49  // Utils
50  unsigned int offset = 0;
51 
52  // First packet sent: TimelineLabelBinaryPacket
53  VerifyTimelineLabelBinaryPacket(EmptyOptional(), entityName, readableData, offset);
54 
55  // Second packet sent: TimelineRelationshipBinaryPacket
57  EmptyOptional(),
58  entityGuid,
59  EmptyOptional(),
60  readableData,
61  offset);
62 
63  // Third packet sent: TimelineRelationshipBinaryPacket
65  EmptyOptional(),
66  EmptyOptional(),
67  labelTypeGuid,
68  readableData,
69  offset);
70 
71  // Mark the buffer as read
72  mockBufferManager.MarkRead(readableBuffer);
73 }
void VerifyTimelineLabelBinaryPacket(Optional< ProfilingGuid > guid, const std::string &label, const unsigned char *readableData, unsigned int &offset)
void VerifyTimelineRelationshipBinaryPacket(ProfilingRelationshipType relationshipType, Optional< ProfilingGuid > relationshipGuid, Optional< ProfilingGuid > headGuid, Optional< ProfilingGuid > tailGuid, const unsigned char *readableData, unsigned int &offset)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
Head uses data of Tail.
Definition: TimelineModel.h:22

◆ BOOST_AUTO_TEST_CASE() [2/7]

BOOST_AUTO_TEST_CASE ( SendWellKnownLabelsAndEventClassesTest  )

Definition at line 75 of file TimelineUtilityMethodsTests.cpp.

References LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS, LabelsAndEventClasses::BACKENDID_GUID, LabelsAndEventClasses::BACKENDID_LABEL, BOOST_CHECK(), LabelsAndEventClasses::CONNECTION, LabelsAndEventClasses::CONNECTION_GUID, MockBufferManager::GetReadableBuffer(), LabelsAndEventClasses::INDEX_GUID, LabelsAndEventClasses::INDEX_LABEL, LabelsAndEventClasses::INFERENCE, LabelsAndEventClasses::INFERENCE_GUID, LabelsAndEventClasses::LAYER, LabelsAndEventClasses::LAYER_GUID, MockBufferManager::MarkRead(), LabelsAndEventClasses::NAME_GUID, LabelsAndEventClasses::NAME_LABEL, LabelsAndEventClasses::NETWORK, LabelsAndEventClasses::NETWORK_GUID, LabelsAndEventClasses::TYPE_GUID, LabelsAndEventClasses::TYPE_LABEL, VerifyTimelineEventClassBinaryPacket(), VerifyTimelineLabelBinaryPacket(), LabelsAndEventClasses::WORKLOAD, LabelsAndEventClasses::WORKLOAD_EXECUTION, LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID, and LabelsAndEventClasses::WORKLOAD_GUID.

76 {
77  MockBufferManager mockBufferManager(1024);
78  std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
79  TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
80 
81  BOOST_CHECK_NO_THROW(timelineUtilityMethods.SendWellKnownLabelsAndEventClasses());
82 
83  // Commit all packets at once
84  timelineUtilityMethods.Commit();
85 
86  // Get the readable buffer
87  auto readableBuffer = mockBufferManager.GetReadableBuffer();
88  BOOST_CHECK(readableBuffer != nullptr);
89  unsigned int size = readableBuffer->GetSize();
90  BOOST_TEST(size == 388);
91  const unsigned char* readableData = readableBuffer->GetReadableData();
92  BOOST_CHECK(readableData != nullptr);
93 
94  // Utils
95  unsigned int offset = 0;
96 
97  // First "well-known" label: NAME
98  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::NAME_GUID,
99  LabelsAndEventClasses::NAME_LABEL,
100  readableData,
101  offset);
102 
103  // Second "well-known" label: TYPE
104  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::TYPE_GUID,
105  LabelsAndEventClasses::TYPE_LABEL,
106  readableData,
107  offset);
108 
109  // Third "well-known" label: INDEX
110  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::INDEX_GUID,
111  LabelsAndEventClasses::INDEX_LABEL,
112  readableData,
113  offset);
114 
115  // Forth "well-known" label: BACKENDID
116  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::BACKENDID_GUID,
117  LabelsAndEventClasses::BACKENDID_LABEL,
118  readableData,
119  offset);
120 
121  // Well-known types
122  // Layer
123  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::LAYER_GUID,
124  LabelsAndEventClasses::LAYER,
125  readableData,
126  offset);
127 
128  // Workload
129  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::WORKLOAD_GUID,
130  LabelsAndEventClasses::WORKLOAD,
131  readableData,
132  offset);
133 
134  // Network
135  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::NETWORK_GUID,
136  LabelsAndEventClasses::NETWORK,
137  readableData,
138  offset);
139 
140  // Connection
141  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::CONNECTION_GUID,
142  LabelsAndEventClasses::CONNECTION,
143  readableData,
144  offset);
145  // Inference
146  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::INFERENCE_GUID,
147  LabelsAndEventClasses::INFERENCE,
148  readableData,
149  offset);
150  // Workload Execution
151  VerifyTimelineLabelBinaryPacket(LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID,
152  LabelsAndEventClasses::WORKLOAD_EXECUTION,
153  readableData,
154  offset);
155 
156  // First "well-known" event class: START OF LIFE
157  VerifyTimelineEventClassBinaryPacket(LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS,
158  readableData,
159  offset);
160 
161  // Second "well-known" event class: END OF LIFE
162  VerifyTimelineEventClassBinaryPacket(LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS,
163  readableData,
164  offset);
165 
166  // Mark the buffer as read
167  mockBufferManager.MarkRead(readableBuffer);
168 }
void VerifyTimelineLabelBinaryPacket(Optional< ProfilingGuid > guid, const std::string &label, const unsigned char *readableData, unsigned int &offset)
void VerifyTimelineEventClassBinaryPacket(ProfilingGuid guid, const unsigned char *readableData, unsigned int &offset)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)

◆ BOOST_AUTO_TEST_CASE() [3/7]

BOOST_AUTO_TEST_CASE ( CreateNamedTypedChildEntityTest  )

Definition at line 170 of file TimelineUtilityMethodsTests.cpp.

References BOOST_CHECK(), MockBufferManager::GetReadableBuffer(), ProfilingService::Instance(), armnn::profiling::LabelLink, MockBufferManager::MarkRead(), LabelsAndEventClasses::NAME_GUID, ProfilingService::NextGuid(), armnn::profiling::RetentionLink, LabelsAndEventClasses::TYPE_GUID, VerifyTimelineEntityBinaryPacket(), VerifyTimelineLabelBinaryPacket(), and VerifyTimelineRelationshipBinaryPacket().

171 {
172  MockBufferManager mockBufferManager(1024);
173  std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
174  TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
175 
176  ProfilingDynamicGuid childEntityGuid(0);
177  ProfilingGuid parentEntityGuid(123);
178  const std::string entityName = "some entity";
179  const std::string entityType = "some type";
180 
181  // Generate first guid to ensure that the named typed entity guid is not 0 on local single test.
182  ProfilingService::Instance().NextGuid();
183 
184  BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedChildEntity(parentEntityGuid, "", entityType),
186  BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedChildEntity(parentEntityGuid, entityName, ""),
188  BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedChildEntity(
189  childEntityGuid, parentEntityGuid, "", entityType), InvalidArgumentException);
190  BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedChildEntity(
191  childEntityGuid, parentEntityGuid, entityName, ""), InvalidArgumentException);
192 
193  BOOST_CHECK_NO_THROW(childEntityGuid = timelineUtilityMethods.CreateNamedTypedChildEntity(parentEntityGuid,
194  entityName,
195  entityType));
196  BOOST_CHECK(childEntityGuid != ProfilingGuid(0));
197 
198  // Commit all packets at once
199  timelineUtilityMethods.Commit();
200 
201  // Get the readable buffer
202  auto readableBuffer = mockBufferManager.GetReadableBuffer();
203  BOOST_CHECK(readableBuffer != nullptr);
204  unsigned int size = readableBuffer->GetSize();
205  BOOST_CHECK(size == 292);
206  const unsigned char* readableData = readableBuffer->GetReadableData();
207  BOOST_CHECK(readableData != nullptr);
208 
209  // Utils
210  unsigned int offset = 0;
211 
212  // First packet sent: TimelineEntityBinaryPacket
213  VerifyTimelineEntityBinaryPacket(EmptyOptional(), readableData, offset);
214 
215  // Second packet sent: TimelineLabelBinaryPacket
216  VerifyTimelineLabelBinaryPacket(EmptyOptional(), entityName, readableData, offset);
217 
218  // Third packet sent: TimelineRelationshipBinaryPacket
220  EmptyOptional(),
221  EmptyOptional(),
222  EmptyOptional(),
223  readableData,
224  offset);
225 
226  // Fourth packet sent: TimelineRelationshipBinaryPacket
228  EmptyOptional(),
229  EmptyOptional(),
230  LabelsAndEventClasses::NAME_GUID,
231  readableData,
232  offset);
233 
234  // Fifth packet sent: TimelineLabelBinaryPacket
235  VerifyTimelineLabelBinaryPacket(EmptyOptional(), entityType, readableData, offset);
236 
237  // Sixth packet sent: TimelineRelationshipBinaryPacket
239  EmptyOptional(),
240  EmptyOptional(),
241  EmptyOptional(),
242  readableData,
243  offset);
244 
245  // Seventh packet sent: TimelineRelationshipBinaryPacket
247  EmptyOptional(),
248  EmptyOptional(),
249  LabelsAndEventClasses::TYPE_GUID,
250  readableData,
251  offset);
252 
253  // Eighth packet sent: TimelineRelationshipBinaryPacket
255  EmptyOptional(),
256  parentEntityGuid,
257  EmptyOptional(),
258  readableData,
259  offset);
260 
261  // Mark the buffer as read
262  mockBufferManager.MarkRead(readableBuffer);
263 }
void VerifyTimelineLabelBinaryPacket(Optional< ProfilingGuid > guid, const std::string &label, const unsigned char *readableData, unsigned int &offset)
void VerifyTimelineRelationshipBinaryPacket(ProfilingRelationshipType relationshipType, Optional< ProfilingGuid > relationshipGuid, Optional< ProfilingGuid > headGuid, Optional< ProfilingGuid > tailGuid, const unsigned char *readableData, unsigned int &offset)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
Head uses data of Tail.
Definition: TimelineModel.h:22
Strongly typed guids to distinguish between those generated at runtime, and those that are statically...
Definition: Types.hpp:291
void VerifyTimelineEntityBinaryPacket(Optional< ProfilingGuid > guid, const unsigned char *readableData, unsigned int &offset)

◆ BOOST_AUTO_TEST_CASE() [4/7]

BOOST_AUTO_TEST_CASE ( DeclareLabelTest  )

Definition at line 265 of file TimelineUtilityMethodsTests.cpp.

References BOOST_CHECK(), ProfilingService::Instance(), and ProfilingService::NextGuid().

266 {
267  MockBufferManager mockBufferManager(1024);
268  std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
269  TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
270 
271  // Generate first guid to ensure that the named typed entity guid is not 0 on local single test.
272  ProfilingService::Instance().NextGuid();
273 
274  // Try declaring an invalid (empty) label
275  BOOST_CHECK_THROW(timelineUtilityMethods.DeclareLabel(""), InvalidArgumentException);
276 
277  // Try declaring an invalid (wrong SWTrace format) label
278  BOOST_CHECK_THROW(timelineUtilityMethods.DeclareLabel("inv@lid lab€l"), RuntimeException);
279 
280  // Declare a valid label
281  const std::string labelName = "valid label";
282  ProfilingGuid labelGuid = 0;
283  BOOST_CHECK_NO_THROW(labelGuid = timelineUtilityMethods.DeclareLabel(labelName));
284  BOOST_CHECK(labelGuid != ProfilingGuid(0));
285 
286  // Try adding the same label as before
287  ProfilingGuid newLabelGuid = 0;
288  BOOST_CHECK_NO_THROW(newLabelGuid = timelineUtilityMethods.DeclareLabel(labelName));
289  BOOST_CHECK(newLabelGuid != ProfilingGuid(0));
290  BOOST_CHECK(newLabelGuid == labelGuid);
291 }
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)

◆ BOOST_AUTO_TEST_CASE() [5/7]

BOOST_AUTO_TEST_CASE ( CreateNameTypeEntityInvalidTest  )

Definition at line 293 of file TimelineUtilityMethodsTests.cpp.

References ProfilingService::Instance(), and ProfilingService::NextGuid().

294 {
295  MockBufferManager mockBufferManager(1024);
296  std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
297  TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
298 
299  // Invalid name
300  BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedEntity("", "Type"), InvalidArgumentException);
301 
302  // Invalid type
303  BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedEntity("Name", ""), InvalidArgumentException);
304 
305  ProfilingDynamicGuid guid = ProfilingService::Instance().NextGuid();
306 
307  // CreatedNamedTypedEntity with Guid - Invalid name
308  BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedEntity(guid, "", "Type"),
310 
311  // CreatedNamedTypedEntity with Guid - Invalid type
312  BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedEntity(guid, "Name", ""),
314 
315 }
Strongly typed guids to distinguish between those generated at runtime, and those that are statically...
Definition: Types.hpp:291

◆ BOOST_AUTO_TEST_CASE() [6/7]

BOOST_AUTO_TEST_CASE ( CreateNameTypeEntityTest  )

Definition at line 317 of file TimelineUtilityMethodsTests.cpp.

References BOOST_CHECK(), MockBufferManager::GetReadableBuffer(), ProfilingService::Instance(), armnn::profiling::LabelLink, MockBufferManager::MarkRead(), LabelsAndEventClasses::NAME_GUID, ProfilingService::NextGuid(), LabelsAndEventClasses::TYPE_GUID, VerifyTimelineEntityBinaryPacket(), VerifyTimelineLabelBinaryPacket(), and VerifyTimelineRelationshipBinaryPacket().

318 {
319  MockBufferManager mockBufferManager(1024);
320  std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
321  TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
322 
323  const std::string entityName = "Entity0";
324  const std::string entityType = "Type0";
325 
326  // Generate first guid to ensure that the named typed entity guid is not 0 on local single test.
327  ProfilingService::Instance().NextGuid();
328 
329  ProfilingDynamicGuid guid = timelineUtilityMethods.CreateNamedTypedEntity(entityName, entityType);
330  BOOST_CHECK(guid != ProfilingGuid(0));
331 
332  // Commit all packets at once
333  timelineUtilityMethods.Commit();
334 
335  // Get the readable buffer
336  auto readableBuffer = mockBufferManager.GetReadableBuffer();
337  BOOST_CHECK(readableBuffer != nullptr);
338  unsigned int size = readableBuffer->GetSize();
339  BOOST_CHECK(size == 244);
340  const unsigned char* readableData = readableBuffer->GetReadableData();
341  BOOST_CHECK(readableData != nullptr);
342 
343  // Utils
344  unsigned int offset = 0;
345 
346  // First packet sent: TimelineEntityBinaryPacket
347  VerifyTimelineEntityBinaryPacket(guid, readableData, offset);
348 
349  // Packets for Name Entity
350  // First packet sent: TimelineLabelBinaryPacket
351  VerifyTimelineLabelBinaryPacket(EmptyOptional(), entityName, readableData, offset);
352 
353  // Second packet sent: TimelineRelationshipBinaryPacket
355  EmptyOptional(),
356  EmptyOptional(),
357  EmptyOptional(),
358  readableData,
359  offset);
360 
361  // Third packet sent: TimelineRelationshipBinaryPacket
363  EmptyOptional(),
364  EmptyOptional(),
365  LabelsAndEventClasses::NAME_GUID,
366  readableData,
367  offset);
368 
369  // Packets for Type Entity
370  // First packet sent: TimelineLabelBinaryPacket
371  VerifyTimelineLabelBinaryPacket(EmptyOptional(), entityType, readableData, offset);
372 
373  // Second packet sent: TimelineRelationshipBinaryPacket
375  EmptyOptional(),
376  EmptyOptional(),
377  EmptyOptional(),
378  readableData,
379  offset);
380 
381  // Third packet sent: TimelineRelationshipBinaryPacket
383  EmptyOptional(),
384  EmptyOptional(),
385  LabelsAndEventClasses::TYPE_GUID,
386  readableData,
387  offset);
388 
389  // Mark the buffer as read
390  mockBufferManager.MarkRead(readableBuffer);
391 }
void VerifyTimelineLabelBinaryPacket(Optional< ProfilingGuid > guid, const std::string &label, const unsigned char *readableData, unsigned int &offset)
void VerifyTimelineRelationshipBinaryPacket(ProfilingRelationshipType relationshipType, Optional< ProfilingGuid > relationshipGuid, Optional< ProfilingGuid > headGuid, Optional< ProfilingGuid > tailGuid, const unsigned char *readableData, unsigned int &offset)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
Head uses data of Tail.
Definition: TimelineModel.h:22
Strongly typed guids to distinguish between those generated at runtime, and those that are statically...
Definition: Types.hpp:291
void VerifyTimelineEntityBinaryPacket(Optional< ProfilingGuid > guid, const unsigned char *readableData, unsigned int &offset)

◆ BOOST_AUTO_TEST_CASE() [7/7]

BOOST_AUTO_TEST_CASE ( RecordEventTest  )

Definition at line 393 of file TimelineUtilityMethodsTests.cpp.

References BOOST_AUTO_TEST_SUITE_END(), BOOST_CHECK(), armnn::profiling::DataLink, armnn::profiling::ExecutionLink, MockBufferManager::GetReadableBuffer(), ProfilingService::Instance(), MockBufferManager::MarkRead(), ProfilingService::NextGuid(), VerifyTimelineEventBinaryPacket(), and VerifyTimelineRelationshipBinaryPacket().

394 {
395  MockBufferManager mockBufferManager(1024);
396  std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
397  TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
398  // Generate first guid to ensure that the named typed entity guid is not 0 on local single test.
399  ProfilingService::Instance().NextGuid();
400 
401  ProfilingGuid entityGuid(123);
402  ProfilingStaticGuid eventClassGuid(456);
403  ProfilingDynamicGuid eventGuid(0);
404  BOOST_CHECK_NO_THROW(eventGuid = timelineUtilityMethods.RecordEvent(entityGuid, eventClassGuid));
405  BOOST_CHECK(eventGuid != ProfilingGuid(0));
406 
407  // Commit all packets at once
408  timelineUtilityMethods.Commit();
409 
410  // Get the readable buffer
411  auto readableBuffer = mockBufferManager.GetReadableBuffer();
412  BOOST_CHECK(readableBuffer != nullptr);
413  unsigned int size = readableBuffer->GetSize();
414  BOOST_CHECK(size == 116);
415  const unsigned char* readableData = readableBuffer->GetReadableData();
416  BOOST_CHECK(readableData != nullptr);
417 
418  // Utils
419  unsigned int offset = 0;
420 
421  // First packet sent: TimelineEntityBinaryPacket
423 
424  // Second packet sent: TimelineRelationshipBinaryPacket
426  EmptyOptional(),
427  entityGuid,
428  EmptyOptional(),
429  readableData,
430  offset);
431 
432  // Third packet sent: TimelineRelationshipBinaryPacket
434  EmptyOptional(),
435  eventGuid,
436  eventClassGuid,
437  readableData,
438  offset);
439 
440  // Mark the buffer as read
441  mockBufferManager.MarkRead(readableBuffer);
442 }
Head retains(parents) Tail.
Definition: TimelineModel.h:20
void VerifyTimelineRelationshipBinaryPacket(ProfilingRelationshipType relationshipType, Optional< ProfilingGuid > relationshipGuid, Optional< ProfilingGuid > headGuid, Optional< ProfilingGuid > tailGuid, const unsigned char *readableData, unsigned int &offset)
void VerifyTimelineEventBinaryPacket(Optional< uint64_t > timestamp, Optional< std::thread::id > threadId, Optional< ProfilingGuid > eventGuid, const unsigned char *readableData, unsigned int &offset)
Head execution start depends on Tail execution completion.
Definition: TimelineModel.h:21
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
Strongly typed guids to distinguish between those generated at runtime, and those that are statically...
Definition: Types.hpp:291