Destroyed How to use debug API (markdown)
parent
d2bc7a3b7a
commit
590147a2f7
@ -1,37 +0,0 @@
|
|||||||
### Get this repo
|
|
||||||
```shell
|
|
||||||
git clone -b Alpha https://github.com/MetaCubeX/Clash.Meta.git clash-meta
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build clash-meta
|
|
||||||
```shell
|
|
||||||
cd clash-meta
|
|
||||||
go build -o clash-meta
|
|
||||||
```
|
|
||||||
|
|
||||||
### start clash-meta:
|
|
||||||
put your config.yaml in this directory, set log level to **debug** and run:
|
|
||||||
```shell
|
|
||||||
./clash-meta -d ./
|
|
||||||
```
|
|
||||||
|
|
||||||
### Use debug API
|
|
||||||
You can check available API on `http://127.0.0.1:xxxx/debug/pprof/`,
|
|
||||||
`xxxx` refers to the `external-controller` port in your config.yaml.
|
|
||||||
|
|
||||||
You may need to install [Graphviz](https://graphviz.org/download/) before you view the http debug API tools below:
|
|
||||||
|
|
||||||
Heap details:
|
|
||||||
```
|
|
||||||
go tool pprof -http=:8080 http://127.0.0.1:xxxx/debug/pprof/heap
|
|
||||||
````
|
|
||||||
[Full image](https://raw.githubusercontent.com/MetaCubeX/Clash.Meta/Alpha/docs/heap.svg)
|
|
||||||
<img src="https://raw.githubusercontent.com/MetaCubeX/Clash.Meta/Alpha/docs/heap.svg">
|
|
||||||
|
|
||||||
Allocs details
|
|
||||||
````
|
|
||||||
go tool pprof -http=:8080 http://127.0.0.1:xxxx/debug/pprof/allocs
|
|
||||||
````
|
|
||||||
[Full image](https://raw.githubusercontent.com/MetaCubeX/Clash.Meta/Alpha/docs/allocs.svg)
|
|
||||||
<img src="https://raw.githubusercontent.com/MetaCubeX/Clash.Meta/Alpha/docs/allocs.svg">
|
|
||||||
|
|
Reference in New Issue
Block a user