bytedance / memory-leak-detector

Other
1.09k stars 178 forks source link

raphael.py执行报错 #13

Closed jinshiyi11 closed 3 years ago

jinshiyi11 commented 3 years ago

使用python2.7,执行raphael.py分析report文件,报错如下,是否有python版本要求?

File "D:\open\memory-leak-detector\library\src\main\python\raphael.py", line 149, in print_report
    report.sort(lambda x, y: x.size - y.size, reverse=True)
TypeError: comparison function must return int, not long
jinshiyi11 commented 3 years ago

改成

report.sort(lambda x, y: cmp(x.size , y.size), reverse=True)

后可以正常运行,另外关于leak-doubts.txt的内容能否在文档里面说明一下

shentianzhou commented 3 years ago

中文版里有数据说明