Compact Algorithms for Measuring Network Performance