Performance measurement of iOS App through Appium

I am automating the performance testing of an app through Appium.
App behaviour: After clicking/tapping on any button in app then UI of App is getting freeze until complete operation of that button is performed.
Requirement: I wanted an API from Appium from which I can able to listen when the operation is finished and now I can start to use another button. Currently I am putting manual wait of some seconds due to which I can not measure exact time in which operation is finished.
Suggestion: If every time UI of app is got frozen after clicking button then we should have an Appium function which can notice this transition from normal to freeze and vice versa. Could it possible if debug build of IOS app can return some event listener after completing the Task

Did u try with wait for element to disappear approach?

I doubt if appium can be useful for this purpose.

I would do this testing manually for each build, pick up P1 user stories and go through app on different devices and report bugs.

Anyways one can’t do 100% automation and some manual testing is needed then why not cover this aspect as well ?

In my app I saw sometimes api itself respond slowly which makes app looks slower, you can do API performance testing separately with rest-assured, check if response is within X sec etc.

Regards,
Vikram

One more way we can do it :using below code-
WebDriverWait wait = new WebDriverWait(appiumDriver, 10);
wait.until(ExpectedConditions.elementToBeClickable(appiumDriver.findElementById(accessibilityID)));

But it takes 4 seconds to click on button after buttons are appearing on screen. Can we make it fast so that whenever button is displayed on screen instantly Appium can click on that?