python log函數轉成call graph

shihyuyao shihyuyao 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
enter main test.c:85
enter func1 test.c:70
enter func2 test.c:67
leave func2 test.c:67
enter func3 test.c:75
enter func4 test.c:80
leave func4 test.c:80
leave func3 test.c:75
leave func1 test.c:70
enter func3 test.c:75
enter func4 test.c:80
leave func4 test.c:80
leave func3 test.c:75
leave main test.c:85


怎么透过函数 enter and leave 转成下面 dot 格式 ?

digraph G {
node [peripheries=2 style="filled,rounded" fontname="Vera Sans YuanTi Mono" color="#eecc80"];
rankdir=LR;
label="test.c"
main [shape=box];
node [color="#eecc80" shape=ellipse];edge [color="#eecc80"];
main->func1
node [color="#ccee80" shape=octagon];edge [color="#ccee80"];
func1->func2
node [color="#ccee80" shape=octagon];edge [color="#ccee80"];
func1->func3
node [color="#80ccee" shape=hexagon];edge [color="#80ccee"];
func3->func4
node [color="#eecc80" shape=ellipse];edge [color="#eecc80"];
main->func3
}



...全文

相关推荐

评论
收藏 已收藏
分享
返回顶部
shihyuyao
脚本语言 37,738 成员 34,208 内容