Class ProfileContext

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.

Public Functions

virtual ~ProfileContext() = 0
virtual Error StartProfile() = 0

Start profiling on the inference server.

Return

Error object indicating success or failure.

virtual Error StopProfile() = 0

Stop profiling on the inference server.