Class ProfileContext¶
Defined in File request.h
Class Documentation¶
-
class
ProfileContext
¶ A ProfileContext object is used to control profiling on the inference server.
Once created a ProfileContext object can be used repeatedly.
A ProfileContext object can use either HTTP protocol or GRPC protocol depending on the Create function (ProfileHttpContext::Create or ProfileGrpcContext::Create). For example:
std::unique_ptr<ProfileContext> ctx; ProfileGrpcContext::Create(&ctx, "localhost:8000"); ctx->StartProfile(); ... ctx->StopProfile(); ...
- Note
ProfileContext::Create methods are thread-safe. StartProfiling() and StopProfiling() are not thread-safe. For a given ProfileContext, calls to these methods must be serialized.