ONNX Runtime
Loading...
Searching...
No Matches
Ort::ProfilingEvent Struct Reference

Owning wrapper around OrtProfilingEvent. More...

#include <onnxruntime_cxx_api.h>

Inheritance diagram for Ort::ProfilingEvent:
Ort::detail::ConstProfilingEventImpl< OrtProfilingEvent > Ort::detail::Base< T >

Public Member Functions

 ProfilingEvent (std::nullptr_t)
 No instance is created.
 
 ProfilingEvent (OrtProfilingEvent *p)
 Take ownership.
 
 ProfilingEvent (OrtProfilingEventCategory category, int32_t process_id, int32_t thread_id, const char *event_name, int64_t timestamp_us, int64_t duration_us, const std::unordered_map< std::string, std::string > &args={})
 Wraps OrtEpApi::CreateProfilingEvent.
 
 ProfilingEvent (OrtProfilingEventCategory category, int32_t process_id, int32_t thread_id, const char *event_name, int64_t timestamp_us, int64_t duration_us, const char *const *arg_keys, const char *const *arg_values, size_t num_args)
 Wraps OrtEpApi::CreateProfilingEvent.
 
ConstProfilingEvent GetConst () const
 
- Public Member Functions inherited from Ort::detail::ConstProfilingEventImpl< OrtProfilingEvent >
OrtProfilingEventCategory GetCategory () const
 Get the event category. Wraps OrtEpApi::ProfilingEvent_GetCategory.
 
const char * GetName () const
 Get the event name. Wraps OrtEpApi::ProfilingEvent_GetName.
 
int64_t GetTimestampUs () const
 Get the start timestamp in microseconds. Wraps OrtEpApi::ProfilingEvent_GetTimestampUs.
 
int64_t GetDurationUs () const
 Get the duration in microseconds. Wraps OrtEpApi::ProfilingEvent_GetDurationUs.
 
const char * GetArgValue (const char *key) const
 Get the value of an event argument by key. Wraps OrtEpApi::ProfilingEvent_GetArgValue.
 
- Public Member Functions inherited from Ort::detail::Base< T >
constexpr Base ()=default
 
constexpr Base (contained_type *p) noexcept
 
 ~Base ()
 
 Base (const Base &)=delete
 
Baseoperator= (const Base &)=delete
 
 Base (Base &&v) noexcept
 
Baseoperator= (Base &&v) noexcept
 
constexpr operator contained_type * () const noexcept
 
constexpr contained_typeoperator* () const noexcept
 
contained_typerelease ()
 Relinquishes ownership of the contained C object pointer The underlying object is not destroyed.
 

Additional Inherited Members

- Public Types inherited from Ort::detail::ConstProfilingEventImpl< OrtProfilingEvent >
using B = Ort::detail::Base< OrtProfilingEvent >
 
- Public Types inherited from Ort::detail::Base< T >
using contained_type = T
 
- Protected Attributes inherited from Ort::detail::Base< T >
contained_typep_ {}
 

Detailed Description

Owning wrapper around OrtProfilingEvent.

Use this to create profiling events via OrtEpApi::CreateProfilingEvent. The event is released automatically on destruction.

Since
Version 1.25.

Constructor & Destructor Documentation

◆ ProfilingEvent() [1/4]

Ort::ProfilingEvent::ProfilingEvent ( std::nullptr_t  )
inlineexplicit

No instance is created.

◆ ProfilingEvent() [2/4]

Ort::ProfilingEvent::ProfilingEvent ( OrtProfilingEvent p)
inlineexplicit

Take ownership.

◆ ProfilingEvent() [3/4]

Ort::ProfilingEvent::ProfilingEvent ( OrtProfilingEventCategory  category,
int32_t  process_id,
int32_t  thread_id,
const char *  event_name,
int64_t  timestamp_us,
int64_t  duration_us,
const std::unordered_map< std::string, std::string > &  args = {} 
)

◆ ProfilingEvent() [4/4]

Ort::ProfilingEvent::ProfilingEvent ( OrtProfilingEventCategory  category,
int32_t  process_id,
int32_t  thread_id,
const char *  event_name,
int64_t  timestamp_us,
int64_t  duration_us,
const char *const *  arg_keys,
const char *const *  arg_values,
size_t  num_args 
)

Member Function Documentation

◆ GetConst()

ConstProfilingEvent Ort::ProfilingEvent::GetConst ( ) const
inline