文/kingkai
Baron Schwartz 自述:http://www.mysqlperformanceblog.com/2010/08/31/introducing-tcprstat-a-tcp-response-time-tool/
官网地址: http://www.percona.com/docs/wiki/tcprstat:start
一个非常不错的耗时统计工具,二次开发难度也不大。单进程,双线程(分别负责抓包和统计)。
为简化设计,源码中频繁使用到malloc/free。难怪作者要强调“I personally have been running it for many weeks on some production servers without stopping it and have seen no problems, so I am pretty sure it has no memory leaks or other problems. ” 对我来说,这也确实是一个值得反思的惊讶。
我们的系统往往太复杂,太复杂了。
2000行的代码能干些什么,tcprstat给了答案。