Accelerating network measurement in software