MutexProfile turns on mutex profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.
(file string, nsec uint)
| 148 | // It uses a profile rate of 1 for most accurate information. If a different rate is |
| 149 | // desired, set the rate and write the profile manually. |
| 150 | func (*HandlerT) MutexProfile(file string, nsec uint) error { |
| 151 | runtime.SetMutexProfileFraction(1) |
| 152 | time.Sleep(time.Duration(nsec) * time.Second) |
| 153 | defer runtime.SetMutexProfileFraction(0) |
| 154 | return writeProfile("mutex", file) |
| 155 | } |
| 156 | |
| 157 | // SetMutexProfileFraction sets the rate of mutex profiling. |
| 158 | func (*HandlerT) SetMutexProfileFraction(rate int) { |
nothing calls this directly
no test coverage detected