Add benchpi function