![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
golang
golang
abcwywht
这个作者很懒,什么都没留下…
展开
-
golang cpu 内存分析
top命令可以查看cpu使用情况的前几名list 函数名 可以查看函数的cpu使用情况最后一列为函数名称,其他各项内容意义如下:flat:当前函数占用CPU的耗时flat%:当前函数占用CPU的耗时百分比sum%:函数占用CPU的累积耗时百分比cum:当前函数+调用当前函数的占用CPU总耗时cum%: 当前函数+调用当前函数的占用CPU总耗时百分比例如:(pprof) top10Total: 2525 samples298 11.8% 11.8% 345 13转载 2022-01-13 10:53:45 · 683 阅读 · 0 评论 -
golang中runtime.MemStats
Alloc: This is the same as HeapAllocHeapAlloc: HeapAlloc is bytes of allocated heap objectsHeapSys: 从操作系统为堆申请到的字节数,HeapSys=HeapInuse+HeapIdleHeapInuse: 正在使用的堆内存字节数。HeapInuse minus HeapAlloc estimates the amount of memory that has been dedicated to...原创 2021-12-15 10:36:30 · 821 阅读 · 0 评论 -
golang flag.string解析参数
参数 功能 name 命令行参数名称,比如 -b, -help value 默认值,未显式指定的参数,给出隐式的默认值,比如本例中-b未给出的话,*b=false usage 提示信息,如果给出的参数不正确或者需要查看帮助 -help,那么会给出这里指定的字符串 参考地址:https://blog.csdn.net/guanchunsheng/article/details/79612153flag使用前,必须首先解析:...原创 2021-12-14 14:34:17 · 1327 阅读 · 0 评论