Overview
API Introduction
The msServiceProfiler module offers C++ APIs for profiling inference services.
For details about the functions and usage examples of the inference service profiling APIs, see Profiling.
Header file: ${INSTALL_DIR}/include/msServiceProfiler.h
Library file: ${INSTALL_DIR}/lib64/libms_service_profiler.so
Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.
API List
Specific APIs are listed below.
API |
Description |
|---|---|
Determines whether to enable profiling. |
|
Records the start node of a process. |
|
Records the end node of a process. |
|
Records the value of a metric class. |
|
Records the increment of a metric class. |
|
Defines the scope of a metric class. |
|
Defines the scope of a metric class as the request ID. |
|
Defines the scope of a metric class as global. |
|
Flushes the request record to the disk. |
|
Records an event. |
|
Records the association between different resources. |
|
Adds an attribute and returns the current object. Chain calls are supported. |
|
Adds key attributes of array resources. |
|
Assigns a unique resource ID to link the data with its corresponding timeline. |
|
Defines the domain of the data. Entries in the same domain form a category in the trace data. |
|
Adds an array attribute that accepts only numeric values. |
|
Adds an array attribute through a callback function. |
|
Obtains the current record data. |
|
Encapsulates profiling statements. |