add statistics to persub and persubclient + restful