Time-consuming method of ios application, method and system for monitoring time-consuming loading of views
A view and API call technology, applied in hardware monitoring, error detection/correction, instrumentation, etc., can solve problems such as inability to measure performance, inability to monitor IOSApp running status, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0062] The embodiment of the present invention provides a method time-consuming monitoring method of an IOS application, which is used to monitor the time-consuming invocation of each method in the main thread invoked by the IOS application:
[0063] Set the objc_msgSend function pointer as a hook function; the hook function includes: the first function, which is used to obtain the parameters of the objc_msgSend function; the second function, which is used to use the parameters of the objc_msgSend function to call the objc_msgSend function and record the start calling time; Three functions, which are used to record the calling end time of the objc_msgSend function when the objc_msgSend function is called, and calculate the calling time of calling the objc_msgSend function according to the calling start time and the calling end time;
[0064] When the IOS application calls any method in the main thread, it calls the hook function through the objc_msgSend function pointer, and ca...
Embodiment 2
[0075] see figure 1 As shown, the embodiment of the present invention discloses a method time-consuming monitoring system for IOS applications, including:
[0076] A function pointer replacement module, which is used to replace the objc_msgSend function pointer with a hook function; the hook function includes: the first function, which is used to obtain the parameters of the objc_msgSend function; the second function, which is used to use the parameters of the objc_msgSend function to call the objc_msgSend function And record the call start time; the third function is used to record the call end time of the objc_msgSend function when the objc_msgSend function is called, and calculate the call time of objc_msgSend function according to the call start time and call end time ;
[0077] The first call time-consuming calculation module, which is used to call the hook function through the objc_msgSend function pointer when the IOS application calls any method in the main thread, an...
Embodiment 3
[0085] The embodiment of the present invention discloses a loading view time-consuming monitoring method of an IOS application:
[0086]On the basis of Examples 1 and 2, it is necessary to monitor the time-consuming loading of the view, create a classification of the view controller, and replace the ViewDidLoad function with the fourth function through the runtime function when the classification of the view controller is loaded, and replace the ViewDidAppear function It is the fifth function; when the view starts loading, call the fourth function to calculate the calling time of objc_msgSend function through the hook function; when the view is loaded, call the fifth function to obtain the calling time of objc_msgSend function calculated by the hook function Time, so as to realize the real-time monitoring of the time-consuming loading view when the IOS application is running. The specific implementation process is as follows:
[0087] Replace the objc_msgSend function pointer ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com