func Init(pc *ProfilingConfig) error
Init takes a *ProfilingConfig to initialize profiling (turned on/off depending on the value set in pc.Enabled) and register the profiling service in the server provided in pc.Server.
ProfilingConfig defines configuration options for the Init method.
type ProfilingConfig struct { // Setting this to true will enable profiling. Enabled bool // Profiling uses a circular buffer (ring buffer) to store statistics for // only the last few RPCs so that profiling stats do not grow unbounded. This // parameter defines the upper limit on the number of RPCs for which // statistics should be stored at any given time. An average RPC requires // approximately 2-3 KiB of memory for profiling-related statistics, so // choose an appropriate number based on the amount of memory you can afford. StreamStatsSize uint32 // To expose the profiling service and its methods, a *grpc.Server must be // provided. Server *grpc.Server }