Perfcounter

fix #145