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

Method for measuring code segment execution time and terminal equipment

A technology of execution time and code segments, applied in error detection/correction, software testing/debugging, instruments, etc., can solve the problems of high workload and low efficiency in modifying software code, and achieve the effect of automatic measurement and easy further analysis.

Active Publication Date: 2019-12-17
PAX COMP TECH SHENZHEN
View PDF10 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In view of this, the embodiment of the present invention provides a method and a terminal device for measuring the execution time of a code segment, so as to solve the problem of excessive workload in modifying the software code in the prior art when searching for codes that may take too much time by modifying the software code. and low efficiency

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
  • Method for measuring code segment execution time and terminal equipment
  • Method for measuring code segment execution time and terminal equipment
  • Method for measuring code segment execution time and terminal equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of the present invention.

[0049] In order to illustrate the technical solution of the present invention, specific embodiments are used for description below.

[0050] figure 1 This is a schematic diagram of the implementation process of a method for measuring the execution time of a code segment provided by an embodiment of the present invention, which is detailed as follows.

[0051] Step 101: Analyze the acquired me...

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 is suitable for the technical field of program optimization, and provides a method for measuring the execution time of a code segment and terminal equipment, and the method comprises thesteps: analyzing an obtained measurement instruction set, and obtaining a position information database; replacing the to-be-measured code instructions at the positions corresponding to all the position information of the to-be-measured code segment with a preset instruction; when a preset instruction in the to-be-measured code segment is run, replacing the preset instruction with the backed-up to-be-measured code instruction, and storing the current time in the access time of the to-be-measured code segment; after the operation of the to-be-measured code segment is finished, calculating execution time of a to-be-measured code segment corresponding to each instruction in the measurement instruction set; therefore, the execution time of any code segment of the program can be measured without modifying the condition of the program code, which code segment of the program is not high in execution efficiency can be quickly diagnosed, automatic measurement is realized, a measurement resultis formed, and further analysis is facilitated.

Description

Technical field [0001] The invention belongs to the technical field of program optimization, and particularly relates to a method and terminal equipment for measuring the execution time of a code segment. Background technique [0002] During the running of the program, there is often a problem that the running efficiency of the program is not high, which affects various user experiences. At present, it is possible to manually review the code corresponding to the program, perform logical analysis on the code, find out that there may be too much time-consuming code, and then modify the corresponding too much time-consuming code to add debugging information, and then perform actual running debugging verification, and repeatedly modify the software code As well as debugging and verification, resulting in a lot of work. In addition, it is necessary to modify the software code many times and add various debugging information to diagnose those code fragments that take too much time to ...

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/36
CPCG06F11/3628G06F11/3644G06F11/366
Inventor 汤增宏
Owner PAX COMP TECH SHENZHEN
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