if (profilingService.IsProfilingEnabled())
{
std::unique_ptr<ISendTimelinePacket> sendTimelinepacket = profilingService.GetSendTimelinePacket();
- return std::make_unique<TimelineUtilityMethods>(sendTimelinepacket, profilingService);
+ return std::make_unique<TimelineUtilityMethods>(sendTimelinepacket);
}
else
{
}
// Generate dynamic GUID of the entity
- ProfilingDynamicGuid entityGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid entityGuid = profiling::ProfilingService::GetNextGuid();
CreateNamedTypedEntity(entityGuid, name, type);
}
// Generate a static GUID for the given label name
- ProfilingStaticGuid labelGuid = m_ProfilingService.GetStaticId(labelName);
+ ProfilingStaticGuid labelGuid = profiling::ProfilingService::GetStaticId(labelName);
// Send the new label to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineLabelBinaryPacket(labelGuid, labelName);
ProfilingStaticGuid labelGuid = DeclareLabel(labelName);
// Generate a GUID for the label relationship
- ProfilingDynamicGuid relationshipGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid();
// Send the new label link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink,
labelGuid);
// Generate a GUID for the label relationship
- ProfilingDynamicGuid relationshipLabelGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid relationshipLabelGuid = profiling::ProfilingService::GetNextGuid();
// Send the new label link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink,
ProfilingStaticGuid typeNameGuid)
{
// Generate a GUID for the label relationship
- ProfilingDynamicGuid relationshipGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid();
// Send the new label link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink,
typeNameGuid);
// Generate a GUID for the label relationship
- ProfilingDynamicGuid relationshipLabelGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid relationshipLabelGuid = profiling::ProfilingService::GetNextGuid();
// Send the new label link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink,
ProfilingDynamicGuid childEntityGuid = CreateNamedTypedEntity(entityName, entityType);
// Generate a GUID for the retention link relationship
- ProfilingDynamicGuid retentionLinkGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid();
// Send the new retention link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink,
CreateNamedTypedEntity(childEntityGuid, entityName, entityType);
// Generate a GUID for the retention link relationship
- ProfilingDynamicGuid retentionLinkGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid();
// Send the new retention link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink,
CreateNamedTypedEntity(childEntityGuid, entityName, typeGuid);
// Generate a GUID for the retention link relationship
- ProfilingDynamicGuid retentionLinkGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid();
// Send the new retention link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink,
ProfilingGuid tailGuid)
{
// Generate a GUID for the relationship
- ProfilingDynamicGuid relationshipGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid();
// Send the new retention link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(relationshipType,
ProfilingGuid tailGuid)
{
// Generate a GUID for the relationship
- ProfilingDynamicGuid relationshipGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid();
// Send the new retention link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(relationshipType,
std::thread::id threadId = std::this_thread::get_id();
// Generate a GUID for the event
- ProfilingDynamicGuid eventGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid eventGuid = profiling::ProfilingService::GetNextGuid();
// Send the new timeline event to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineEventBinaryPacket(timestamp, threadId, eventGuid);
// Generate a GUID for the execution link
- ProfilingDynamicGuid executionLinkId = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid executionLinkId = profiling::ProfilingService::GetNextGuid();
// Send the new execution link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::ExecutionLink,
eventGuid);
// Generate a GUID for the data relationship link
- ProfilingDynamicGuid eventClassLinkId = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid eventClassLinkId = profiling::ProfilingService::GetNextGuid();
// Send the new data relationship link to the external profiling service, this call throws in case of error
m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::DataLink,
ProfilingDynamicGuid TimelineUtilityMethods::RecordWorkloadInferenceAndStartOfLifeEvent(ProfilingGuid workloadGuid,
ProfilingGuid inferenceGuid)
{
- ProfilingDynamicGuid workloadInferenceGuid = m_ProfilingService.GetNextGuid();
+ ProfilingDynamicGuid workloadInferenceGuid = profiling::ProfilingService::GetNextGuid();
CreateTypedEntity(workloadInferenceGuid, LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID);
CreateRelationship(ProfilingRelationshipType::RetentionLink, inferenceGuid, workloadInferenceGuid);
CreateRelationship(ProfilingRelationshipType::RetentionLink, workloadGuid, workloadInferenceGuid);
ProfilingService profilingService;
std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
- TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService);
+ TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
// Generate first guid to ensure that the named typed entity guid is not 0 on local single test.
profilingService.NextGuid();
BOOST_AUTO_TEST_CASE(SendWellKnownLabelsAndEventClassesTest)
{
MockBufferManager mockBufferManager(1024);
- ProfilingService profilingService;
std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
- TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService);
+ TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
BOOST_CHECK_NO_THROW(timelineUtilityMethods.SendWellKnownLabelsAndEventClasses());
MockBufferManager mockBufferManager(1024);
ProfilingService profilingService;
std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
- TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService);
+ TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
ProfilingDynamicGuid childEntityGuid(0);
ProfilingGuid parentEntityGuid(123);
MockBufferManager mockBufferManager(1024);
ProfilingService profilingService;
std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
- TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService);
+ TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
// Generate first guid to ensure that the named typed entity guid is not 0 on local single test.
profilingService.NextGuid();
MockBufferManager mockBufferManager(1024);
ProfilingService profilingService;
std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
- TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService);
+ TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
// Invalid name
BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedEntity("", "Type"), InvalidArgumentException);
MockBufferManager mockBufferManager(1024);
ProfilingService profilingService;
std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
- TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService);
+ TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
const std::string entityName = "Entity0";
const std::string entityType = "Type0";
MockBufferManager mockBufferManager(1024);
ProfilingService profilingService;
std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager);
- TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService);
+ TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket);
// Generate first guid to ensure that the named typed entity guid is not 0 on local single test.
profilingService.NextGuid();