ArmNN
 21.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 344 of file TimelineUtilityMethods.cpp.

References LabelsAndEventClasses::CONNECTION_GUID, and ProfilingService::GetNextGuid().

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

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

◆ CreateNamedTypedChildEntity() [1/3]

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

Definition at line 234 of file TimelineUtilityMethods.cpp.

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

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

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

◆ CreateNamedTypedChildEntity() [2/3]

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

Definition at line 268 of file TimelineUtilityMethods.cpp.

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

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

◆ CreateNamedTypedChildEntity() [3/3]

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

Definition at line 301 of file TimelineUtilityMethods.cpp.

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

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

◆ CreateNamedTypedEntity() [1/3]

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

Definition at line 99 of file TimelineUtilityMethods.cpp.

References ProfilingService::GetNextGuid().

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

100 {
101  // Check that the entity name is valid
102  if (name.empty())
103  {
104  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
105  }
106 
107  // Check that the entity type is valid
108  if (type.empty())
109  {
110  throw InvalidArgumentException("Invalid entity type, the entity type cannot be empty");
111  }
112 
113  // Generate dynamic GUID of the entity
114  ProfilingDynamicGuid entityGuid = profiling::ProfilingService::GetNextGuid();
115 
116  CreateNamedTypedEntity(entityGuid, name, type);
117 
118  return entityGuid;
119 }
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 121 of file TimelineUtilityMethods.cpp.

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

124 {
125  // Check that the entity name is valid
126  if (name.empty())
127  {
128  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
129  }
130 
131  // Check that the entity type is valid
132  if (type.empty())
133  {
134  throw InvalidArgumentException("Invalid entity type, the entity type cannot be empty");
135  }
136 
137  // Send Entity Binary Packet of the entity to the external profiling service
138  m_SendTimelinePacket->SendTimelineEntityBinaryPacket(entityGuid);
139 
140  // Create name entity and send the relationship of the entity with the given name
141  NameEntity(entityGuid, name);
142 
143  // Create type entity and send the relationship of the entity with the given type
144  TypeEntity(entityGuid, type);
145 }
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 147 of file TimelineUtilityMethods.cpp.

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

150 {
151  // Check that the entity name is valid
152  if (name.empty())
153  {
154  throw InvalidArgumentException("Invalid entity name, the entity name cannot be empty");
155  }
156 
157  // Send Entity Binary Packet of the entity to the external profiling service
158  m_SendTimelinePacket->SendTimelineEntityBinaryPacket(entityGuid);
159 
160  // Create name entity and send the relationship of the entity with the given name
161  NameEntity(entityGuid, name);
162 
163  // Create type entity and send the relationship of the entity with the given type
164  MarkEntityWithType(entityGuid, typeGuid);
165 }
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 327 of file TimelineUtilityMethods.cpp.

References ProfilingService::GetNextGuid().

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

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

◆ CreateTypedEntity()

void CreateTypedEntity ( ProfilingGuid  entityGuid,
ProfilingStaticGuid  typeGuid 
)

Definition at line 360 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::MarkEntityWithType().

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

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

◆ DeclareLabel()

ProfilingStaticGuid DeclareLabel ( const std::string &  labelName)

Definition at line 167 of file TimelineUtilityMethods.cpp.

References ProfilingService::GetStaticId().

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

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

◆ GetTimelineUtils()

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

Definition at line 15 of file TimelineUtilityMethods.cpp.

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

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

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

◆ MarkEntityWithLabel()

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

Definition at line 185 of file TimelineUtilityMethods.cpp.

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

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

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

◆ MarkEntityWithType()

void MarkEntityWithType ( ProfilingGuid  entityGuid,
ProfilingStaticGuid  typeNameGuid 
)

Definition at line 210 of file TimelineUtilityMethods.cpp.

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

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

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

◆ NameEntity()

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

Definition at line 224 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::MarkEntityWithLabel(), and LabelsAndEventClasses::NAME_GUID.

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

225 {
227 }
static ARMNN_DLLEXPORT ProfilingStaticGuid NAME_GUID
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 413 of file TimelineUtilityMethods.cpp.

References LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS, and TimelineUtilityMethods::RecordEvent().

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

414 {
416 }
static ARMNN_DLLEXPORT ProfilingStaticGuid ARMNN_PROFILING_EOL_EVENT_CLASS
ProfilingDynamicGuid RecordEvent(ProfilingGuid entityGuid, ProfilingStaticGuid eventClassGuid)

◆ RecordEvent()

ProfilingDynamicGuid RecordEvent ( ProfilingGuid  entityGuid,
ProfilingStaticGuid  eventClassGuid 
)

Definition at line 369 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().

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

◆ RecordWorkloadInferenceAndStartOfLifeEvent()

ProfilingDynamicGuid RecordWorkloadInferenceAndStartOfLifeEvent ( ProfilingGuid  workloadGuid,
ProfilingGuid  inferenceGuid 
)

Definition at line 396 of file TimelineUtilityMethods.cpp.

References LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS, LabelsAndEventClasses::CHILD_GUID, TimelineUtilityMethods::CreateRelationship(), TimelineUtilityMethods::CreateTypedEntity(), LabelsAndEventClasses::EXECUTION_OF_GUID, ProfilingService::GetNextGuid(), TimelineUtilityMethods::RecordEvent(), armnn::profiling::RetentionLink, and LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID.

Referenced by TimelineUtilityMethods::TimelineUtilityMethods().

398 {
399  ProfilingDynamicGuid workloadInferenceGuid = profiling::ProfilingService::GetNextGuid();
402  inferenceGuid,
403  workloadInferenceGuid,
406  workloadGuid,
407  workloadInferenceGuid,
410  return workloadInferenceGuid;
411 }
static ARMNN_DLLEXPORT ProfilingStaticGuid WORKLOAD_EXECUTION_GUID
static ARMNN_DLLEXPORT ProfilingStaticGuid ARMNN_PROFILING_SOL_EVENT_CLASS
static ARMNN_DLLEXPORT ProfilingStaticGuid EXECUTION_OF_GUID
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)
static ARMNN_DLLEXPORT ProfilingStaticGuid CHILD_GUID

◆ SendWellKnownLabelsAndEventClasses()

void SendWellKnownLabelsAndEventClasses ( ISendTimelinePacket timelinePacket)
static

Definition at line 30 of file TimelineUtilityMethods.cpp.

References LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS, LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS_NAME, LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS_NAME_GUID, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS_NAME, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS_NAME_GUID, LabelsAndEventClasses::BACKENDID_GUID, LabelsAndEventClasses::BACKENDID_LABEL, LabelsAndEventClasses::CHILD_GUID, LabelsAndEventClasses::CHILD_LABEL, ISendTimelinePacket::Commit(), LabelsAndEventClasses::CONNECTION, LabelsAndEventClasses::CONNECTION_GUID, LabelsAndEventClasses::EXECUTION_OF_GUID, LabelsAndEventClasses::EXECUTION_OF_LABEL, LabelsAndEventClasses::INDEX_GUID, LabelsAndEventClasses::INDEX_LABEL, LabelsAndEventClasses::INFERENCE, LabelsAndEventClasses::INFERENCE_GUID, LabelsAndEventClasses::LAYER, LabelsAndEventClasses::LAYER_GUID, LabelsAndEventClasses::NAME_GUID, LabelsAndEventClasses::NAME_LABEL, LabelsAndEventClasses::NETWORK, LabelsAndEventClasses::NETWORK_GUID, LabelsAndEventClasses::PROCESS_ID_GUID, LabelsAndEventClasses::PROCESS_ID_LABEL, ISendTimelinePacket::SendTimelineEventClassBinaryPacket(), ISendTimelinePacket::SendTimelineLabelBinaryPacket(), LabelsAndEventClasses::TYPE_GUID, LabelsAndEventClasses::TYPE_LABEL, LabelsAndEventClasses::WORKLOAD, LabelsAndEventClasses::WORKLOAD_EXECUTION, LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID, and LabelsAndEventClasses::WORKLOAD_GUID.

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

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

◆ TypeEntity()

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

Definition at line 229 of file TimelineUtilityMethods.cpp.

References TimelineUtilityMethods::MarkEntityWithLabel(), and LabelsAndEventClasses::TYPE_GUID.

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

230 {
232 }
void MarkEntityWithLabel(ProfilingGuid entityGuid, const std::string &labelName, ProfilingStaticGuid labelLinkGuid)
static ARMNN_DLLEXPORT ProfilingStaticGuid TYPE_GUID

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