Class ProfileContext

Inheritance Relationships

Derived Types

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.

Subclassed by nvidia::inferenceserver::client::ProfileGrpcContext, nvidia::inferenceserver::client::ProfileHttpContext

Public Functions

Error StartProfile()

Start profiling on the inference server.

Return
Error object indicating success or failure.

Error StopProfile()

Stop profiling on the inference server.

Protected Functions

ProfileContext(bool)
virtual Error SendCommand(const std::string &cmd_str) = 0

Protected Attributes

const bool verbose_