note that the most part of latency_stats.c's code comes from Coly Li <i@coly.li>