lilydjwg / swapview-rosetta

Print swap usage per process. Implemented in various programming languages
491 stars 108 forks source link

go_goroutine: Code cleanup #159

Closed Xuanwo closed 4 years ago

Xuanwo commented 4 years ago

Signed-off-by: Xuanwo github@xuanwo.io

lilydjwg commented 4 years ago

然后我试了一下,很遗憾结果是错的:在关 swap 的情况下显示出来了很多进程……

lilydjwg commented 4 years ago

(哦,它原本结果就是错的……难道 Go 又搞了什么 breaking changes?

Xuanwo commented 4 years ago

我看看

Xuanwo commented 4 years ago

是一开始的版本写的就不对,没有去掉 size == 0 的情况,我改一下

这个 bug 修复提升了 20% 的性能,2333

lilydjwg commented 4 years ago

Thanks!