Skip to main content

StartProfilingServer

Starts an http server on the given port

def StartProfilingServer(
ctx: context.Context,
pprofPort: int
) - > error

Starts an HTTP server on the given port. This server is used for profiling and will shut down gracefully when the provided context is cancelled.

Parameters

NameTypeDescription
ctxcontext.ContextThe context used to control the server's lifecycle. When this context is cancelled, the profiling server will attempt to shut down.
pprofPortintThe port number on which the profiling HTTP server will listen for incoming requests.

Returns

TypeDescription
errorAn error if the server fails to start or encounters an issue during operation.