Update cpushark example to the new API