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

Application program lag information acquisition method and device

An information collection and application technology, applied in the application field, can solve problems such as code intrusion, and achieve the effects of reducing impact, preventing freezes, and reducing burden

Pending Publication Date: 2020-07-17
深圳市乐宜科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Some detection methods, such as Wechat’s stuttering detection solution, use ASM stub insertion, which supports the positioning of fps and stack acquisition, but you need to analyze the stack yourself according to the method id of ASM stub insertion, which has high positioning accuracy and consumes performance. Small, but somewhat invasive to the code

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
  • Application program lag information acquisition method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] The embodiment of the present invention provides such as figure 1 The freeze information collection method of the application shown in the application is applicable to the Android system and includes:

[0026] S1. Determine the frame drawing object, and establish a corresponding callback mechanism;

[0027] S2. Obtain the stack of the main thread based on the asynchronous thread method according to the specified time interval;

[0028] S3. When the frame drawing execution time exceeds the freeze threshold, output a log including stacks.

[0029] The frame drawing object is a component that processes display rendering in the Android system, that is, a component that executes frame drawing. In this embodiment, it is mainly aimed at Choreographer. Then establish a callback mechanism, which is used to monitor the Choreographer, and when the Choreographer is executing a certain function / step, it returns a message to indicate that the corresponding function / step is executed...

Embodiment 2

[0045] This embodiment is used to specifically illustrate the freeze information collection process of the application:

[0046] 1. The refresh rate of the Android system is 16.67ms, because the refresh rate set by Android is 60FPS, that is, the refresh rate of 60 frames per second, and the refresh rate is about 16ms, so the system will send a Vsync signal (vertical synchronization) every 16.67ms signal) to trigger the rendering of the interface. If there are factors that cause stuttering in the page, it will cause frame loss and stuttering. (Correspondingly, 16.67ms can be set as the specified time interval above)

[0047] 2. Create an object that receives the Vsync signal, the object requests the Vsync signal and gets a callback, and performs the next step at the callback (that is, the doFrame() method in the monitoring callback of Choreographer).

[0048] 3. Record the time point of the previous frame drawing every time, and calculate the difference value based on the time...

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 an application program lag information acquisition method and device, and the method comprises the steps: determining a frame drawing object, and building a corresponding callback mechanism; according to a specified time interval, obtaining a stack of a main thread based on an asynchronous thread mode; when the execution time of the frame rendering exceeds a lag threshold,outputting a log including the stack. The device is suitable for the method. According to the embodiment of the invention, the frame drawing object is determined, and the corresponding callback mechanism is established, so that the parameter for judging the lag can be obtained; through the time interval, data can be reasonably collected, the burden of the system can be reduced, the influence on the system can be reduced as much as possible in an asynchronous thread mode, and therefore extra jamming can be prevented; and if the execution time exceeds the lag threshold, a log which can be used as data for analyzing the lag reason is output.

Description

technical field [0001] The invention relates to the technical field of application programs, in particular to a method and device for collecting stall information of application programs. Background technique [0002] When the application is in use, there will be a phenomenon of freezing, which will affect the user's use. Therefore, in the development and maintenance phase, it is necessary to analyze the cause of the freeze. [0003] Some detection methods, such as Wechat’s stuttering detection solution, use ASM stub insertion, which supports the positioning of fps and stack acquisition, but you need to analyze the stack yourself according to the method id of ASM stub insertion, which has high positioning accuracy and consumes performance. Small, but somewhat invasive to the code. Contents of the invention [0004] The embodiments of the present invention aim to solve one of the technical problems in the related art at least to a certain extent. Therefore, an object of ...

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
IPC IPC(8): G06F11/36
CPCG06F11/3688G06F11/3692
Inventor 周聪伟
Owner 深圳市乐宜科技有限公司
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