Function
newCPUProfiler
(p *Profiling, options ...CPUProfilerOption)
Source from the content-addressed store, hash-verified
| 56 | } |
| 57 | |
| 58 | func newCPUProfiler(p *Profiling, options ...CPUProfilerOption) *CPUProfiler { |
| 59 | c := &CPUProfiler{ |
| 60 | p: p, |
| 61 | time: nanotime, |
| 62 | } |
| 63 | for _, opt := range options { |
| 64 | opt(c) |
| 65 | } |
| 66 | return c |
| 67 | } |
| 68 | |
| 69 | // StartProfile begins recording the CPU profile. The method returns a boolean |
| 70 | // to indicate whether starting the profile succeeded (e.g. false is returned if |
Tested by
no test coverage detected