ArmNN
 22.02
TimelineUtilityMethods Class Reference

#include <TimelineUtilityMethods.hpp>

Public Member Functions

 TimelineUtilityMethods (std::unique_ptr< ISendTimelinePacket > &sendTimelinePacket)
 
 TimelineUtilityMethods (TimelineUtilityMethods &&other)
 
 TimelineUtilityMethods (const TimelineUtilityMethods &other)=delete
 
TimelineUtilityMethodsoperator= (const TimelineUtilityMethods &other)=delete
 
TimelineUtilityMethodsoperator= (TimelineUtilityMethods &&other)=default
 
 ~TimelineUtilityMethods ()=default
 
ProfilingDynamicGuid CreateNamedTypedEntity (const std::string &name, const std::string &type)
 
void CreateNamedTypedEntity (ProfilingGuid entityGuid, const std::string &name, const std::string &type)
 
void CreateNamedTypedEntity (ProfilingGuid entityGuid, const std::string &name, ProfilingStaticGuid typeGuid)
 
void MarkEntityWithLabel (ProfilingGuid entityGuid, const std::string &labelName, ProfilingStaticGuid labelLinkGuid)
 
ProfilingStaticGuid DeclareLabel (const std::string &labelName)
 
void NameEntity (ProfilingGuid entityGuid, const std::string &name)
 
void TypeEntity (ProfilingGuid entityGuid, const std::string &type)
 
ProfilingDynamicGuid CreateNamedTypedChildEntity (ProfilingGuid parentEntityGuid, const std::string &entityName, const std::string &entityType)
 
void CreateNamedTypedChildEntity (ProfilingGuid entityGuid, ProfilingGuid parentEntityGuid, const std::string &entityName, const std::string &entityType)
 
void CreateNamedTypedChildEntity (ProfilingGuid entityGuid, ProfilingGuid parentEntityGuid, const std::string &entityName, ProfilingStaticGuid typeGuid)
 
ProfilingDynamicGuid CreateRelationship (ProfilingRelationshipType relationshipType, ProfilingGuid headGuid, ProfilingGuid tailGuid, ProfilingGuid relationshipCategory)
 
ProfilingDynamicGuid CreateConnectionRelationship (ProfilingRelationshipType relationshipType, ProfilingGuid headGuid, ProfilingGuid tailGuid)
 
void CreateTypedEntity (ProfilingGuid entityGuid, ProfilingStaticGuid typeGuid)
 
void MarkEntityWithType (ProfilingGuid entityGuid, ProfilingStaticGuid typeNameGuid)
 
ProfilingDynamicGuid RecordEvent (ProfilingGuid entityGuid, ProfilingStaticGuid eventClassGuid)
 
ProfilingDynamicGuid RecordWorkloadInferenceAndStartOfLifeEvent (ProfilingGuid workloadGuid, ProfilingGuid inferenceGuid)
 
void RecordEndOfLifeEvent (ProfilingGuid entityGuid)
 
void Commit ()
 

Static Public Member Functions

static std::unique_ptr< TimelineUtilityMethodsGetTimelineUtils (ProfilingService &profilingService)
 
static void SendWellKnownLabelsAndEventClasses (ISendTimelinePacket &timelinePacket)
 

Detailed Description

Definition at line 19 of file TimelineUtilityMethods.hpp.

Constructor & Destructor Documentation

◆ TimelineUtilityMethods() [1/3]

TimelineUtilityMethods ( std::unique_ptr< ISendTimelinePacket > &  sendTimelinePacket)
inline

Definition at line 27 of file TimelineUtilityMethods.hpp.

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

29  : m_SendTimelinePacket(std::move(sendTimelinePacket)) {}

◆ TimelineUtilityMethods() [2/3]

◆ TimelineUtilityMethods() [3/3]

◆ ~TimelineUtilityMethods()

Member Function Documentation

◆ Commit()

void Commit ( )
inline

Definition at line 92 of file TimelineUtilityMethods.hpp.

92 { m_SendTimelinePacket->Commit(); }

◆ CreateConnectionRelationship()

ProfilingDynamicGuid CreateConnectionRelationship ( ProfilingRelationshipType  relationshipType,
ProfilingGuid  headGuid,
ProfilingGuid  tailGuid 
)

Definition at line 347 of file TimelineUtilityMethods.cpp.

References ProfilingService::GetNextGuid().

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

350 {
351  // Generate a GUID for the relationship
352  ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid();
353 
354  // Send the new retention link to the external profiling service, this call throws in case of error
355  m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(relationshipType,
356  relationshipGuid,
357  headGuid,
358  tailGuid,
359  LabelsAndEventClasses::CONNECTION_GUID);
360  return relationshipGuid;
361 }
static ProfilingDynamicGuid GetNextGuid()

◆ CreateNamedTypedChildEntity() [1/3]

ProfilingDynamicGuid CreateNamedTypedChildEntity ( ProfilingGuid  parentEntityGuid,
const std::string &  entityName,
const std::string &  entityType 
)

Definition at line 237 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::CreateNamedTypedEntity(), ProfilingService::GetNextGuid(), and armnn::profiling::RetentionLink.

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

240 {
241  // Check that the entity name is valid
242  if (entityName.empty())
243  {
244  // The entity name is invalid
245  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
246  }
247 
248  // Check that the entity type is valid
249  if (entityType.empty())
250  {
251  // The entity type is invalid
252  throw InvalidArgumentException("Invalid entity type, the entity type cannot be empty");
253  }
254 
255  // Create a named type entity from the given name and type, this call throws in case of error
256  ProfilingDynamicGuid childEntityGuid = CreateNamedTypedEntity(entityName, entityType);
257 
258  // Generate a GUID for the retention link relationship
259  ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid();
260 
261  // Send the new retention link to the external profiling service, this call throws in case of error
262  m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink,
263  retentionLinkGuid,
264  parentEntityGuid,
265  childEntityGuid,
266  LabelsAndEventClasses::EMPTY_GUID);
267 
268  return childEntityGuid;
269 }
ProfilingDynamicGuid CreateNamedTypedEntity(const std::string &name, const std::string &type)
static ProfilingDynamicGuid GetNextGuid()

◆ CreateNamedTypedChildEntity() [2/3]

void CreateNamedTypedChildEntity ( ProfilingGuid  entityGuid,
ProfilingGuid  parentEntityGuid,
const std::string &  entityName,
const std::string &  entityType 
)

Definition at line 271 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::CreateNamedTypedEntity(), ProfilingService::GetNextGuid(), and armnn::profiling::RetentionLink.

275 {
276  // Check that the entity name is valid
277  if (entityName.empty())
278  {
279  // The entity name is invalid
280  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
281  }
282 
283  // Check that the entity type is valid
284  if (entityType.empty())
285  {
286  // The entity type is invalid
287  throw InvalidArgumentException("Invalid entity type, the entity type cannot be empty");
288  }
289 
290  // Create a named type entity from the given guid, name and type, this call throws in case of error
291  CreateNamedTypedEntity(childEntityGuid, entityName, entityType);
292 
293  // Generate a GUID for the retention link relationship
294  ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid();
295 
296  // Send the new retention link to the external profiling service, this call throws in case of error
297  m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink,
298  retentionLinkGuid,
299  parentEntityGuid,
300  childEntityGuid,
301  LabelsAndEventClasses::CHILD_GUID);
302 }
ProfilingDynamicGuid CreateNamedTypedEntity(const std::string &name, const std::string &type)
static ProfilingDynamicGuid GetNextGuid()

◆ CreateNamedTypedChildEntity() [3/3]

void CreateNamedTypedChildEntity ( ProfilingGuid  entityGuid,
ProfilingGuid  parentEntityGuid,
const std::string &  entityName,
ProfilingStaticGuid  typeGuid 
)

Definition at line 304 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::CreateNamedTypedEntity(), ProfilingService::GetNextGuid(), and armnn::profiling::RetentionLink.

308 {
309  // Check that the entity name is valid
310  if (entityName.empty())
311  {
312  // The entity name is invalid
313  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
314  }
315 
316  // Create a named type entity from the given guid, name and type, this call throws in case of error
317  CreateNamedTypedEntity(childEntityGuid, entityName, typeGuid);
318 
319  // Generate a GUID for the retention link relationship
320  ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid();
321 
322  // Send the new retention link to the external profiling service, this call throws in case of error
323  m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink,
324  retentionLinkGuid,
325  parentEntityGuid,
326  childEntityGuid,
327  LabelsAndEventClasses::CHILD_GUID);
328 }
ProfilingDynamicGuid CreateNamedTypedEntity(const std::string &name, const std::string &type)
static ProfilingDynamicGuid GetNextGuid()

◆ CreateNamedTypedEntity() [1/3]

ProfilingDynamicGuid CreateNamedTypedEntity ( const std::string &  name,
const std::string &  type 
)

Definition at line 102 of file TimelineUtilityMethods.cpp.

References ProfilingService::GetNextGuid().

Referenced by TimelineUtilityMethods::CreateNamedTypedChildEntity(), and TimelineUtilityMethods::TimelineUtilityMethods().

103 {
104  // Check that the entity name is valid
105  if (name.empty())
106  {
107  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
108  }
109 
110  // Check that the entity type is valid
111  if (type.empty())
112  {
113  throw InvalidArgumentException("Invalid entity type, the entity type cannot be empty");
114  }
115 
116  // Generate dynamic GUID of the entity
117  ProfilingDynamicGuid entityGuid = profiling::ProfilingService::GetNextGuid();
118 
119  CreateNamedTypedEntity(entityGuid, name, type);
120 
121  return entityGuid;
122 }
ProfilingDynamicGuid CreateNamedTypedEntity(const std::string &name, const std::string &type)
static ProfilingDynamicGuid GetNextGuid()

◆ CreateNamedTypedEntity() [2/3]

void CreateNamedTypedEntity ( ProfilingGuid  entityGuid,
const std::string &  name,
const std::string &  type 
)

Definition at line 124 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::NameEntity(), and TimelineUtilityMethods::TypeEntity().

127 {
128  // Check that the entity name is valid
129  if (name.empty())
130  {
131  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
132  }
133 
134  // Check that the entity type is valid
135  if (type.empty())
136  {
137  throw InvalidArgumentException("Invalid entity type, the entity type cannot be empty");
138  }
139 
140  // Send Entity Binary Packet of the entity to the external profiling service
141  m_SendTimelinePacket->SendTimelineEntityBinaryPacket(entityGuid);
142 
143  // Create name entity and send the relationship of the entity with the given name
144  NameEntity(entityGuid, name);
145 
146  // Create type entity and send the relationship of the entity with the given type
147  TypeEntity(entityGuid, type);
148 }
void NameEntity(ProfilingGuid entityGuid, const std::string &name)
void TypeEntity(ProfilingGuid entityGuid, const std::string &type)

◆ CreateNamedTypedEntity() [3/3]

void CreateNamedTypedEntity ( ProfilingGuid  entityGuid,
const std::string &  name,
ProfilingStaticGuid  typeGuid 
)

Definition at line 150 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::MarkEntityWithType(), and TimelineUtilityMethods::NameEntity().

153 {
154  // Check that the entity name is valid
155  if (name.empty())
156  {
157  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
158  }
159 
160  // Send Entity Binary Packet of the entity to the external profiling service
161  m_SendTimelinePacket->SendTimelineEntityBinaryPacket(entityGuid);
162 
163  // Create name entity and send the relationship of the entity with the given name
164  NameEntity(entityGuid, name);
165 
166  // Create type entity and send the relationship of the entity with the given type
167  MarkEntityWithType(entityGuid, typeGuid);
168 }
void NameEntity(ProfilingGuid entityGuid, const std::string &name)
void MarkEntityWithType(ProfilingGuid entityGuid, ProfilingStaticGuid typeNameGuid)

◆ CreateRelationship()

ProfilingDynamicGuid CreateRelationship ( ProfilingRelationshipType  relationshipType,
ProfilingGuid  headGuid,
ProfilingGuid  tailGuid,
ProfilingGuid  relationshipCategory 
)

Definition at line 330 of file TimelineUtilityMethods.cpp.

References ProfilingService::GetNextGuid().

Referenced by TimelineUtilityMethods::RecordWorkloadInferenceAndStartOfLifeEvent(), and TimelineUtilityMethods::TimelineUtilityMethods().

334 {
335  // Generate a GUID for the relationship
336  ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid();
337 
338  // Send the new retention link to the external profiling service, this call throws in case of error
339  m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(relationshipType,
340  relationshipGuid,
341  headGuid,
342  tailGuid,
343  relationshipCategory);
344  return relationshipGuid;
345 }
static ProfilingDynamicGuid GetNextGuid()

◆ CreateTypedEntity()

void CreateTypedEntity ( ProfilingGuid  entityGuid,
ProfilingStaticGuid  typeGuid 
)

Definition at line 363 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::MarkEntityWithType().

Referenced by TimelineUtilityMethods::RecordWorkloadInferenceAndStartOfLifeEvent(), and TimelineUtilityMethods::TimelineUtilityMethods().

364 {
365  // Send Entity Binary Packet of the entity to the external profiling service
366  m_SendTimelinePacket->SendTimelineEntityBinaryPacket(entityGuid);
367 
368  // Create type entity and send the relationship of the entity with the given type
369  MarkEntityWithType(entityGuid, entityTypeGuid);
370 }
void MarkEntityWithType(ProfilingGuid entityGuid, ProfilingStaticGuid typeNameGuid)

◆ DeclareLabel()

ProfilingStaticGuid DeclareLabel ( const std::string &  labelName)

Definition at line 170 of file TimelineUtilityMethods.cpp.

References ProfilingService::GetStaticId().

Referenced by TimelineUtilityMethods::MarkEntityWithLabel(), and TimelineUtilityMethods::TimelineUtilityMethods().

171 {
172  // Check that the label name is valid
173  if (labelName.empty())
174  {
175  // The label name is invalid
176  throw InvalidArgumentException("Invalid label name, the label name cannot be empty");
177  }
178 
179  // Generate a static GUID for the given label name
180  ProfilingStaticGuid labelGuid = profiling::ProfilingService::GetStaticId(labelName);
181 
182  // Send the new label to the external profiling service, this call throws in case of error
183  m_SendTimelinePacket->SendTimelineLabelBinaryPacket(labelGuid, labelName);
184 
185  return labelGuid;
186 }
static ProfilingStaticGuid GetStaticId(const std::string &str)

◆ GetTimelineUtils()

std::unique_ptr< TimelineUtilityMethods > GetTimelineUtils ( ProfilingService profilingService)
static

Definition at line 18 of file TimelineUtilityMethods.cpp.

References armnn::profiling::Active, ProfilingService::GetCurrentState(), ProfilingService::GetSendTimelinePacket(), and ProfilingService::IsTimelineReportingEnabled().

Referenced by LoadedNetwork::EnqueueWorkload(), LoadedNetwork::Execute(), LoadedNetwork::MakeLoadedNetwork(), LoadedNetwork::SendNetworkStructure(), and RuntimeImpl::UnloadNetwork().

19 {
20  if (profilingService.GetCurrentState() == ProfilingState::Active && profilingService.IsTimelineReportingEnabled())
21  {
22  std::unique_ptr<ISendTimelinePacket> sendTimelinepacket = profilingService.GetSendTimelinePacket();
23  return std::make_unique<TimelineUtilityMethods>(sendTimelinepacket);
24  }
25  else
26  {
27  std::unique_ptr<TimelineUtilityMethods> empty;
28  return empty;
29  }
30 }

◆ MarkEntityWithLabel()

void MarkEntityWithLabel ( ProfilingGuid  entityGuid,
const std::string &  labelName,
ProfilingStaticGuid  labelLinkGuid 
)

Definition at line 188 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::DeclareLabel(), ProfilingService::GetNextGuid(), and armnn::profiling::LabelLink.

Referenced by TimelineUtilityMethods::NameEntity(), TimelineUtilityMethods::TimelineUtilityMethods(), and TimelineUtilityMethods::TypeEntity().

191 {
192  // Check that the label name is valid
193  if (labelName.empty())
194  {
195  // The label name is invalid
196  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
197  }
198 
199  // Declare a label with the label's name, this call throws in case of error
200  ProfilingStaticGuid labelGuid = DeclareLabel(labelName);
201 
202  // Generate a GUID for the label relationship
203  ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid();
204 
205  // Send the new label link to the external profiling service, this call throws in case of error
206  m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink,
207  relationshipGuid,
208  entityGuid,
209  labelGuid,
210  labelTypeGuid);
211 }
ProfilingStaticGuid DeclareLabel(const std::string &labelName)
static ProfilingDynamicGuid GetNextGuid()

◆ MarkEntityWithType()

void MarkEntityWithType ( ProfilingGuid  entityGuid,
ProfilingStaticGuid  typeNameGuid 
)

Definition at line 213 of file TimelineUtilityMethods.cpp.

References ProfilingService::GetNextGuid(), and armnn::profiling::LabelLink.

Referenced by TimelineUtilityMethods::CreateNamedTypedEntity(), TimelineUtilityMethods::CreateTypedEntity(), and TimelineUtilityMethods::TimelineUtilityMethods().

215 {
216  // Generate a GUID for the label relationship
217  ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid();
218 
219  // Send the new label link to the external profiling service, this call throws in case of error
220  m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink,
221  relationshipGuid,
222  entityGuid,
223  typeNameGuid,
224  LabelsAndEventClasses::TYPE_GUID);
225 }
static ProfilingDynamicGuid GetNextGuid()

◆ NameEntity()

void NameEntity ( ProfilingGuid  entityGuid,
const std::string &  name 
)

Definition at line 227 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::MarkEntityWithLabel().

Referenced by TimelineUtilityMethods::CreateNamedTypedEntity(), and TimelineUtilityMethods::TimelineUtilityMethods().

228 {
229  MarkEntityWithLabel(entityGuid, name, LabelsAndEventClasses::NAME_GUID);
230 }
void MarkEntityWithLabel(ProfilingGuid entityGuid, const std::string &labelName, ProfilingStaticGuid labelLinkGuid)

◆ operator=() [1/2]

◆ operator=() [2/2]

TimelineUtilityMethods& operator= ( TimelineUtilityMethods &&  other)
default

◆ RecordEndOfLifeEvent()

void RecordEndOfLifeEvent ( ProfilingGuid  entityGuid)

Definition at line 416 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::RecordEvent().

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

417 {
418  RecordEvent(entityGuid, LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS);
419 }
ProfilingDynamicGuid RecordEvent(ProfilingGuid entityGuid, ProfilingStaticGuid eventClassGuid)

◆ RecordEvent()

ProfilingDynamicGuid RecordEvent ( ProfilingGuid  entityGuid,
ProfilingStaticGuid  eventClassGuid 
)

Definition at line 372 of file TimelineUtilityMethods.cpp.

References armnn::profiling::ExecutionLink, armnnUtils::Threads::GetCurrentThreadId(), ProfilingService::GetNextGuid(), and armnn::profiling::GetTimestamp().

Referenced by TimelineUtilityMethods::RecordEndOfLifeEvent(), TimelineUtilityMethods::RecordWorkloadInferenceAndStartOfLifeEvent(), and TimelineUtilityMethods::TimelineUtilityMethods().

373 {
374  // Take a timestamp
375  uint64_t timestamp = GetTimestamp();
376 
377  // Get the thread id
379 
380  // Generate a GUID for the event
381  ProfilingDynamicGuid eventGuid = profiling::ProfilingService::GetNextGuid();
382 
383  // Send the new timeline event to the external profiling service, this call throws in case of error
384  m_SendTimelinePacket->SendTimelineEventBinaryPacket(timestamp, threadId, eventGuid);
385 
386  // Generate a GUID for the execution link
387  ProfilingDynamicGuid executionLinkId = profiling::ProfilingService::GetNextGuid();
388 
389  // Send the new execution link to the external profiling service, this call throws in case of error
390  m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::ExecutionLink,
391  executionLinkId,
392  entityGuid,
393  eventGuid,
394  eventClassGuid);
395 
396  return eventGuid;
397 }
int GetCurrentThreadId()
Definition: Threads.cpp:27
static ProfilingDynamicGuid GetNextGuid()
uint64_t GetTimestamp()

◆ RecordWorkloadInferenceAndStartOfLifeEvent()

ProfilingDynamicGuid RecordWorkloadInferenceAndStartOfLifeEvent ( ProfilingGuid  workloadGuid,
ProfilingGuid  inferenceGuid 
)

Definition at line 399 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::CreateRelationship(), TimelineUtilityMethods::CreateTypedEntity(), ProfilingService::GetNextGuid(), TimelineUtilityMethods::RecordEvent(), and armnn::profiling::RetentionLink.

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

401 {
402  ProfilingDynamicGuid workloadInferenceGuid = profiling::ProfilingService::GetNextGuid();
403  CreateTypedEntity(workloadInferenceGuid, LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID);
405  inferenceGuid,
406  workloadInferenceGuid,
407  LabelsAndEventClasses::CHILD_GUID);
409  workloadGuid,
410  workloadInferenceGuid,
411  LabelsAndEventClasses::EXECUTION_OF_GUID);
412  RecordEvent(workloadInferenceGuid, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS);
413  return workloadInferenceGuid;
414 }
void CreateTypedEntity(ProfilingGuid entityGuid, ProfilingStaticGuid typeGuid)
ProfilingDynamicGuid RecordEvent(ProfilingGuid entityGuid, ProfilingStaticGuid eventClassGuid)
static ProfilingDynamicGuid GetNextGuid()
ProfilingDynamicGuid CreateRelationship(ProfilingRelationshipType relationshipType, ProfilingGuid headGuid, ProfilingGuid tailGuid, ProfilingGuid relationshipCategory)

◆ SendWellKnownLabelsAndEventClasses()

void SendWellKnownLabelsAndEventClasses ( ISendTimelinePacket timelinePacket)
static

Definition at line 33 of file TimelineUtilityMethods.cpp.

References ISendTimelinePacket::SendTimelineLabelBinaryPacket().

Referenced by ActivateTimelineReportingCommandHandler::operator()(), ConnectionAcknowledgedCommandHandler::operator()(), TEST_SUITE(), and TimelineUtilityMethods::TimelineUtilityMethods().

34 {
35  // Send the "name" label, this call throws in case of error
36  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::NAME_GUID,
37  LabelsAndEventClasses::NAME_LABEL);
38 
39  // Send the "type" label, this call throws in case of error
40  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::TYPE_GUID,
41  LabelsAndEventClasses::TYPE_LABEL);
42 
43  // Send the "index" label, this call throws in case of error
44  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::INDEX_GUID,
45  LabelsAndEventClasses::INDEX_LABEL);
46 
47  // Send the "backendId" label, this call throws in case of error
48  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::BACKENDID_GUID,
49  LabelsAndEventClasses::BACKENDID_LABEL);
50 
51  // Send the "child" label, this call throws in case of error
52  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::CHILD_GUID,
53  LabelsAndEventClasses::CHILD_LABEL);
54 
55  // Send the "execution_of" label, this call throws in case of error
56  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::EXECUTION_OF_GUID,
57  LabelsAndEventClasses::EXECUTION_OF_LABEL);
58 
59  // Send the "process_id" label, this call throws in case of error
60  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::PROCESS_ID_GUID,
61  LabelsAndEventClasses::PROCESS_ID_LABEL);
62 
63  // Send the "layer" label, this call throws in case of error
64  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::LAYER_GUID,
65  LabelsAndEventClasses::LAYER);
66 
67  // Send the "workload" label, this call throws in case of error
68  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::WORKLOAD_GUID,
69  LabelsAndEventClasses::WORKLOAD);
70 
71  // Send the "network" label, this call throws in case of error
72  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::NETWORK_GUID,
73  LabelsAndEventClasses::NETWORK);
74 
75  // Send the "connection" label, this call throws in case of error
76  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::CONNECTION_GUID,
77  LabelsAndEventClasses::CONNECTION);
78 
79  // Send the "inference" label, this call throws in case of error
80  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::INFERENCE_GUID,
81  LabelsAndEventClasses::INFERENCE);
82 
83  // Send the "workload_execution" label, this call throws in case of error
84  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID,
85  LabelsAndEventClasses::WORKLOAD_EXECUTION);
86 
87  // Send the "start of life" event class, this call throws in case of error
88  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS_NAME_GUID,
89  LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS_NAME);
90  timelinePacket.SendTimelineEventClassBinaryPacket(LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS,
91  LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS_NAME_GUID);
92 
93  // Send the "end of life" event class, this call throws in case of error
94  timelinePacket.SendTimelineLabelBinaryPacket(LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS_NAME_GUID,
95  LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS_NAME);
96  timelinePacket.SendTimelineEventClassBinaryPacket(LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS,
97  LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS_NAME_GUID);
98 
99  timelinePacket.Commit();
100 }

◆ TypeEntity()

void TypeEntity ( ProfilingGuid  entityGuid,
const std::string &  type 
)

Definition at line 232 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::MarkEntityWithLabel().

Referenced by TimelineUtilityMethods::CreateNamedTypedEntity(), and TimelineUtilityMethods::TimelineUtilityMethods().

233 {
234  MarkEntityWithLabel(entityGuid, type, LabelsAndEventClasses::TYPE_GUID);
235 }
void MarkEntityWithLabel(ProfilingGuid entityGuid, const std::string &labelName, ProfilingStaticGuid labelLinkGuid)

The documentation for this class was generated from the following files: