ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.82k stars 402 forks source link

How to set parameters to visualize kubelet #107

Open moluzhui opened 2 years ago

moluzhui commented 2 years ago

I want to visualize the kubelet source code, but the following methods are too resource-intensive and the system can't afford it

// path is /root/go/src/k8s.io/kubernetes/cmd/kubelet
go-callvis -format=svg -nostd -group type,pkg  .

I tried to limit the calling scope with the following command, but it seems that the format is wrong, and the content of help is returned

// path is /root/go/src/k8s.io/kubernetes
go-callvis -format=svg -nostd -group type,pkg -focus cmd/kubelet/ -limit pkg/kubectl

Then try to report the error as follows

// path is /root/go/src/k8s.io/kubernetes
go-callvis -format=svg -nostd -group type,pkg cmd/kubelet
-: cannot find package "." in:
        /root/go/src/k8s.io/kubernetes/vendor/cmd/kubelet
2022/01/13 11:13:19 packages contain errors

I use it for the first time, and I don't know how to make a reasonable setting. Can you tell me how to set up a visual kubelet call, thank you very much