micro/profiler/noop.go
Evstigneev Denis 38c5fe8b5a
All checks were successful
test / test (push) Successful in 42s
fixed struct alignment && refactor linter (#369)
## Pull Request template
Please, go through these steps before clicking submit on this PR.

1. Give a descriptive title to your PR.
2. Provide a description of your changes.
3. Make sure you have some relevant tests.
4. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if applicable).

**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**

Reviewed-on: #369
Co-authored-by: Evstigneev Denis <danteevstigneev@yandex.ru>
Co-committed-by: Evstigneev Denis <danteevstigneev@yandex.ru>
2024-12-09 16:23:25 +03:00

21 lines
320 B
Go

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(_ ...Option) Profiler {
return &noopProfiler{}
}