profiler

package
v0.0.0-...-2ba808a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetProfiler

func SetProfiler(p Profiler)

SetProfiler overwrite the default profiler by another

func Start

func Start() error

Start profiler

func Stop

func Stop()

Stop profiler

Types

type DatadogConfig

type DatadogConfig struct {
	Env            string
	ServiceName    string
	ServiceVersion string
}

DatadogConfig hold configuration

type DatadogProfiler

type DatadogProfiler struct {
	// contains filtered or unexported fields
}

DatadogProfiler wrapper for datadog profiler

func NewDatadogProfiler

func NewDatadogProfiler(cfg *DatadogConfig) DatadogProfiler

NewDatadogProfiler create profiler from config

func (DatadogProfiler) Start

func (t DatadogProfiler) Start() error

Start tracer

func (DatadogProfiler) Stop

func (t DatadogProfiler) Stop()

Stop tracer

type NopProfiler

type NopProfiler struct{}

NopProfiler do nothing to help run local

func (NopProfiler) Start

func (t NopProfiler) Start() error

Start do nothing

func (NopProfiler) Stop

func (t NopProfiler) Stop()

Stop do nothing

type Profiler

type Profiler interface {
	Start() error
	Stop()
}

Profiler interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL