integral calculation of averageCps (testoutput)