I write a lot of api, myself. These api may be called by many three parties. How should I count the situation of each third party calling api? should the statistics be updated before each call to the API, and then return the interface data? or should multithreading deal with this problem, both at the same time?