added metrics api to pypy