Add statistics api.