GetStackTrace will return goroutine stack traces for all goroutines in Sync Gateway.
()
| 1847 | |
| 1848 | // GetStackTrace will return goroutine stack traces for all goroutines in Sync Gateway. |
| 1849 | func GetStackTrace() (bytes.Buffer, error) { |
| 1850 | profBuf := bytes.Buffer{} |
| 1851 | err := pprof.Lookup("goroutine").WriteTo(&profBuf, 2) |
| 1852 | return profBuf, err |
| 1853 | } |
| 1854 | |
| 1855 | // RotateFilenamesIfNeeded will remove old files if there are more than |
| 1856 | // 10 matching the given filename pattern. |
no outgoing calls