cprofile run function