Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Monitoring method and system for time consumption of IOS application method and time consumption of view loading

A monitoring system and view technology, applied in hardware monitoring, error detection/correction, instruments, etc., can solve problems such as inability to measure performance, inability to monitor IOSApp running conditions, etc.

Active Publication Date: 2018-06-22
WUHAN DOUYU NETWORK TECH CO LTD
View PDF3 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the Instrument tool can only be used by programmers with application source code, so it must be connected to a computer, and it cannot measure the performance of the user in real usage scenarios, that is, it cannot effectively monitor the operation of the IOS App after the IOS App is released.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Monitoring method and system for time consumption of IOS application method and time consumption of view loading
  • Monitoring method and system for time consumption of IOS application method and time consumption of view loading

Examples

Experimental program
Comparison scheme
Effect test

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 ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a monitoring method and system for the time consumption of an IOS application method and the time consumption of view loading, and relates to the technical field of IOS applications. The method comprises the steps that an objc_msgSend function pointer is set as a hook function; when an IOS application calls any method in a main thread, the hook function is called through the objc_msgSend function pointer, and the time consumption of calling an objc_msgSend function when the IOS application calls the method in the main thread is calculated through the hook function; thetime consumption of calling the objc_msgSend function when the IOS application calls each method in the main thread can be obtained by calling the hook function separately, since calling of each method in the main thread can correspond to calling of the objc_msgSend function, the time consumption of calling the objc_msgSend function is that of calling the method in the main thread, and therefore the time consumption of calling each method in the main thread when the IOS application runs is monitored.

Description

technical field [0001] The invention relates to the technical field of IOS applications, in particular to a method and system for monitoring time-consuming methods of IOS applications and time-consuming loading of views. Background technique [0002] During the development of mobile applications, some performance bottlenecks may be encountered, such as program running freezes or memory cannot be released correctly, which cannot be well monitored or fed back. The general method is to connect the mobile phone to the computer, and use the Instrument tool included in Xcode (an integrated development tool on the Mac OS X operating system) to monitor. The Instrument tool that comes with Xcode is a tool set that exists in the form of an independent APP and contains many powerful detection functions: including performance testing on real devices and simulators, performance analysis of APPs, and inspection of one or more applications or process behavior. The Instrument tool is main...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/30
CPCG06F11/302G06F11/3051
Inventor 张骏张文明陈少杰
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products