(outputFile: string)
| 23 | } |
| 24 | |
| 25 | const exportDebugPprof = async (outputFile: string) => { |
| 26 | const axiosInstance = API.getAxiosInstance(); |
| 27 | const response = await axiosInstance.get( |
| 28 | `http://127.0.0.1:${coderdPProfPort}/debug/pprof/goroutine?debug=1`, |
| 29 | ); |
| 30 | |
| 31 | if (response.status !== 200) { |
| 32 | throw new Error(`Error: Received status code ${response.status}`); |
| 33 | } |
| 34 | |
| 35 | await fs.writeFile(outputFile, response.data); |
| 36 | }; |
| 37 | |
| 38 | export default CoderReporter; |