move time to first byte extraction to it's own function (DRY)