All checks were successful
		
		
	
	test / test (push) Successful in 42s
				
			## 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>
		
			
				
	
	
		
			32 lines
		
	
	
		
			569 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			569 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Package profiler is for profilers
 | |
| package profiler
 | |
| 
 | |
| // Profiler interface
 | |
| type Profiler interface {
 | |
| 	// Start the profiler
 | |
| 	Start() error
 | |
| 	// Stop the profiler
 | |
| 	Stop() error
 | |
| 	// Name of the profiler
 | |
| 	String() string
 | |
| }
 | |
| 
 | |
| // DefaultProfiler holds the default profiler
 | |
| var DefaultProfiler = NewProfiler()
 | |
| 
 | |
| // Options holds the options for profiler
 | |
| type Options struct {
 | |
| 	// Name to use for the profile
 | |
| 	Name string
 | |
| }
 | |
| 
 | |
| // Option func signature
 | |
| type Option func(o *Options)
 | |
| 
 | |
| // Name of the profile
 | |
| func Name(n string) Option {
 | |
| 	return func(o *Options) {
 | |
| 		o.Name = n
 | |
| 	}
 | |
| }
 |