micro/profiler/noop.go

21 lines
323 B
Go
Raw Normal View History

package profiler
type noopProfiler struct{}
func (p *noopProfiler) Start() error {
return nil
}
func (p *noopProfiler) Stop() error {
return nil
}
func (p *noopProfiler) String() string {
return "noop"
}
// NewProfiler returns new noop profiler
func NewProfiler(opts ...Option) Profiler {
return &noopProfiler{}
}