CN112286802B - Method and device for testing program performance and electronic equipment - Google Patents

Method and device for testing program performance and electronic equipment Download PDF

Info

Publication number
CN112286802B
CN112286802B CN202011149010.3A CN202011149010A CN112286802B CN 112286802 B CN112286802 B CN 112286802B CN 202011149010 A CN202011149010 A CN 202011149010A CN 112286802 B CN112286802 B CN 112286802B
Authority
CN
China
Prior art keywords
execution
program
test
link information
container
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011149010.3A
Other languages
Chinese (zh)
Other versions
CN112286802A (en
Inventor
谢天宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qiyue Information Technology Co Ltd
Original Assignee
Shanghai Qiyue Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qiyue Information Technology Co Ltd filed Critical Shanghai Qiyue Information Technology Co Ltd
Priority to CN202011149010.3A priority Critical patent/CN112286802B/en
Publication of CN112286802A publication Critical patent/CN112286802A/en
Application granted granted Critical
Publication of CN112286802B publication Critical patent/CN112286802B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the specification provides a method for testing program performance, which comprises the steps of creating a program test container to load an object to be tested, extracting execution link information of the object to be tested from the program test container, wherein the execution link information is provided with a plurality of execution nodes, performing performance test on the execution link information by using a preset performance evaluation rule, identifying the execution nodes which do not meet the performance evaluation rule, and generating a test result comprising the execution nodes. Because the method of creating the program test container to load the tested object and extracting the execution link information of the tested object from the program test container, no agent is needed to be planted in the project, thus reducing the interference to the tested object, and the positioning of the program short board or the abnormal cause is realized by carrying out performance test on the execution link information and identifying the execution nodes which do not meet the performance evaluation rule.

Description

Method and device for testing program performance and electronic equipment
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method and apparatus for testing program performance, and an electronic device.
Background
Testing programs of projects is an effective way to improve the programs, and currently, the industry tests programs of projects by injecting agents into the programs of projects, and recording performance conditions shown when the programs are executed subsequently.
However, this approach, while also meeting the testing requirements for the project, still leaves room for improvement.
Analysis of the prior art finds that this way is equivalent to taking the program of the tested item as a black box, and the performance is obtained by testing, but the item cannot be evaluated according to internal execution circulation, so that it is difficult to locate a program short board or an abnormality cause, and the way of injecting an agent into the program can cause interference to the program, and problems such as the execution efficiency of the affected item per se and the like are generated.
Disclosure of Invention
The embodiment of the specification provides a method, a device and electronic equipment for testing program performance, which are used for positioning a program short board or an abnormal reason and reducing interference on a tested object.
The embodiment of the specification provides a method for testing program performance, which comprises the following steps:
creating a program test container to load an object to be tested, and extracting execution link information of the object to be tested from the program test container, wherein the execution link information is provided with a plurality of execution nodes;
and performing performance test on the execution link information by using a preset performance evaluation rule, identifying the execution nodes which do not meet the performance evaluation rule, and generating a test result comprising the execution nodes.
Optionally, the tested object is a project program currently running in a program running container;
the creator test container loads the tested object, comprising:
a program test container is created that is independent of the program run container.
Optionally, the extracting the execution link information of the tested object from the program test container includes:
analyzing by using the annotation, identifying a starting point and a method called by the starting point, and generating execution link information by using a reflection method.
Optionally, the performance test on the execution link information by using a preset performance evaluation rule includes:
the method corresponding to the execution link is operated in an orthomode, and execution performance data in the operation process is recorded;
and evaluating the execution performance data by using a preset performance evaluation rule.
Optionally, the performance test on the execution link information by using a preset performance evaluation rule further includes:
recording execution performance data in the process of running the sub-link of the execution link;
the evaluating the execution performance data by using a preset performance evaluation rule includes:
and evaluating the recorded execution performance data according to different levels of the links by using a preset performance evaluation rule.
Optionally, the tested object has a plurality of modules;
the method for identifying the starting point and calling the starting point comprises the following steps:
and reading each module of the tested object, and respectively identifying the starting point of each module and the method called by the starting point.
Optionally, the method further comprises:
and outputting the test result, wherein the test result is used for improving the execution node which does not meet the performance evaluation rule by a user.
Optionally, the index of the performance evaluation rule has at least one of a degree of coupling and a degree of repetition.
The embodiment of the specification also provides a device for testing program performance, which comprises:
the device comprises a container module, a program test container and a program test module, wherein the container module creates a program test container to load an object to be tested, and extracts execution link information of the object to be tested from the program test container, wherein the execution link information is provided with a plurality of execution nodes;
and the testing module is used for carrying out performance testing on the execution link information by utilizing a preset performance evaluation rule, identifying the execution nodes which do not meet the performance evaluation rule, and generating a testing result comprising the execution nodes.
Optionally, the tested object is a project program currently running in a program running container;
the creator test container loads the tested object, comprising:
a program test container is created that is independent of the program run container.
Optionally, the extracting the execution link information of the tested object from the program test container includes:
analyzing by using the annotation, identifying a starting point and a method called by the starting point, and generating execution link information by using a reflection method.
Optionally, the performance test on the execution link information by using a preset performance evaluation rule includes:
the method corresponding to the execution link is operated in an orthomode, and execution performance data in the operation process is recorded;
and evaluating the execution performance data by using a preset performance evaluation rule.
Optionally, the performance test on the execution link information by using a preset performance evaluation rule further includes:
recording execution performance data in the process of running the sub-link of the execution link;
the evaluating the execution performance data by using a preset performance evaluation rule includes:
and evaluating the recorded execution performance data according to different levels of the links by using a preset performance evaluation rule.
Optionally, the tested object has a plurality of modules;
the method for identifying the starting point and calling the starting point comprises the following steps:
and reading each module of the tested object, and respectively identifying the starting point of each module and the method called by the starting point.
Optionally, the test module is further configured to:
and outputting the test result, wherein the test result is used for improving the execution node which does not meet the performance evaluation rule by a user.
Optionally, the index of the performance evaluation rule has at least one of a degree of coupling and a degree of repetition.
The embodiment of the specification also provides an electronic device, wherein the electronic device comprises:
a processor; the method comprises the steps of,
a memory storing computer executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present description also provides a computer-readable storage medium storing one or more programs that, when executed by a processor, implement any of the methods described above.
According to the various technical schemes provided by the embodiment of the specification, a program test container is created to load a tested object, execution link information of the tested object is extracted from the program test container, the execution link information is provided with a plurality of execution nodes, performance test is carried out on the execution link information by utilizing a preset performance evaluation rule, the execution nodes which do not meet the performance evaluation rule are identified, and a test result comprising the execution nodes is generated. Because the method of creating the program test container to load the tested object and extracting the execution link information of the tested object from the program test container, no agent is needed to be planted in the project, thus reducing the interference to the tested object, and the positioning of the program short board or the abnormal cause is realized by carrying out performance test on the execution link information and identifying the execution nodes which do not meet the performance evaluation rule.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a schematic diagram of a method for testing program performance according to an embodiment of the present disclosure;
FIG. 2 is a schematic structural diagram of an apparatus for testing program performance according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer readable medium according to an embodiment of the present disclosure.
Description of the embodiments
Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals in the drawings denote the same or similar elements, components or portions, and thus a repetitive description thereof will be omitted.
The features, structures, characteristics or other details described in a particular embodiment do not exclude that may be combined in one or more other embodiments in a suitable manner, without departing from the technical idea of the invention.
In the description of specific embodiments, features, structures, characteristics, or other details described in the present invention are provided to enable one skilled in the art to fully understand the embodiments. However, it is not excluded that one skilled in the art may practice the present invention without one or more of the specific features, structures, characteristics, or other details.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Fig. 1 is a schematic diagram of a method for testing program performance according to an embodiment of the present disclosure, where the method may include:
s101: creating a program test container, loading an object to be tested, and extracting execution link information of the object to be tested from the program test container, wherein the execution link information is provided with a plurality of execution nodes.
The tested object can be an online project program, and in order to reduce the interference to the north-side object, a colleague realizes the test function, and a program test container can be created to load the tested object, so that the tested object in the program test container can be processed to realize the test.
When the program runs, a running memory space is often created, and in order to distinguish the running memory space for running the tested object from the running memory space for testing the tested object, a program running container is created by creating the running memory space for running the tested object, and a program running container is created by creating the running memory space for testing the tested object.
In order to reduce the interference of the test process on the tested object, in the embodiment of the present specification, the tested object is a project program currently running in a program running container;
the creator test container loading the tested object may include:
a program test container is created that is independent of the program run container.
In order to improve the running speed of a tested object in a program running container and reduce the interference of the test process on the running speed of the tested object, the program running container and the program testing container can be respectively built in a multi-core system, so that the program testing container cannot occupy time slices with the program running container, and the interference of the test process on the running speed of the tested object can be reduced.
Thus, in embodiments of the present description, creating a program test container that is independent of the program run container may include:
a program test container independent of the program run container is created in a kernel where a different and program run container is located.
By creating a separate program test container, online testing can be achieved with less interference.
Before testing, in order to specifically know the internal execution condition of a program and know the internal execution circulation condition of a tested object, so as to accurately position the cause of the generation of a program short board or an abnormality, we can extract an execution link of the tested object first, and record the running condition of each node in a link by the level of the link node when the tested object is run, and accurately position the cause of the generation of the program short board or the abnormality because the recording level is thinned.
In an embodiment of the present disclosure, the extracting the execution link information of the tested object from the program test container may include:
analyzing by using the annotation, identifying a starting point and a method called by the starting point, and generating execution link information by using a reflection method.
In specific implementation, keywords of the tested object can be read, a starting method and a starting class of the tested object are identified according to the keywords of the tested object, classes marked by different keywords are classified, and the method is read through reflection to obtain an execution link of the starting method. Therefore, the coupling degree between the items is avoided, and the execution efficiency of the items is not affected.
Reflection is that in the running state, for any one class, all the attributes and methods of the class can be known; any method and attribute of any object can be invoked; and can change its properties.
In the embodiment of the present specification, the object under test has a plurality of modules;
the method for identifying a starting point and calling the starting point may include:
and reading each module of the tested object, and respectively identifying the starting point of each module and the method called by the starting point.
The creating of the program test container may be, in specific implementation, creating a spring container, which may be implemented by a spring framework, which is not specifically described and limited herein.
S102: and performing performance test on the execution link information by using a preset performance evaluation rule, identifying the execution nodes which do not meet the performance evaluation rule, and generating a test result comprising the execution nodes.
Creating a program test container, loading a tested object, extracting execution link information of the tested object from the program test container, wherein the execution link information is provided with a plurality of execution nodes, performing performance test on the execution link information by using a preset performance evaluation rule, identifying the execution nodes which do not meet the performance evaluation rule, and generating a test result comprising the execution nodes. Because the method of creating the program test container to load the tested object and extracting the execution link information of the tested object from the program test container, no agent is needed to be planted in the project, thus reducing the interference to the tested object, and the positioning of the program short board or the abnormal cause is realized by carrying out performance test on the execution link information and identifying the execution nodes which do not meet the performance evaluation rule.
In the embodiment of the present disclosure, the performing the performance test on the execution link information by using a preset performance evaluation rule may include:
the method corresponding to the execution link is operated in an orthomode, and execution performance data in the operation process is recorded;
and evaluating the execution performance data by using a preset performance evaluation rule.
Wherein, the execution performance data in the running process is recorded, and the execution performance data can be recorded through a queue.
Where orthography is a concept opposite to reflection, we are doing orthography when no reflection related class is used, for example, when a certain class needs to be used, we must know what class is used, what function is to do.
Considering that the logic implementation manner of the program may be complex, so that the logic structure of the execution link may be complex, in this embodiment of the present disclosure, performing the performance test on the execution link information by using the preset performance evaluation rule may further include:
recording execution performance data in the process of running the sub-link of the execution link;
thus, the evaluating the performance data using a preset performance evaluation rule may include:
and evaluating the recorded execution performance data according to different levels of the links by using a preset performance evaluation rule.
Therefore, the recorded execution performance data is evaluated according to different levels of the links, and the link levels and the link nodes which cause the program short boards can be accurately positioned.
In the embodiment of the present specification, the index of the performance evaluation rule has at least one of a degree of coupling and a degree of repetition. Of course, this is only an example, and it should be understood that other indicators describing performance when the program is executed may be used as the indicators of the performance evaluation rule, which is not specifically described herein.
In the embodiment of the present specification, it may further include:
and outputting the test result, wherein the test result is used for improving the execution node which does not meet the performance evaluation rule by a user.
In an embodiment of the present disclosure, the method may further include:
and drawing a visual execution link according to the execution link information, and prompting an execution node which does not meet the performance evaluation rule in the drawn visual execution link.
Therefore, a tester can intuitively know the internal execution node of the program short board, the efficiency is improved, and the user experience is improved.
In an application scenario, when a currently running tested object program is tested, a program test container is created, files of the tested object are loaded, project program files are read, file analysis is carried out by means of different notes in spring, different layers of mvc are obtained, and each execution link always has an initial point which can be a controller interface path, a timing task method, a frame hook method and the like. And acquiring starting points through different annotations, and drawing corresponding execution paths according to the called method, wherein in the process of drawing the corresponding execution paths, the interference of the tested object running currently is small, and after the test, the running condition of the internal execution node of the tested object can be obtained, so that the program short plate can be accurately positioned.
Fig. 2 is a schematic structural diagram of an apparatus for testing program performance according to an embodiment of the present disclosure, where the apparatus may include:
a container module 201, creating a program test container to load an object to be tested, and extracting execution link information of the object to be tested from the program test container, wherein the execution link information is provided with a plurality of execution nodes;
the test module 202 performs performance test on the execution link information by using a preset performance evaluation rule, identifies execution nodes which do not meet the performance evaluation rule, and generates a test result including the execution nodes.
In the embodiment of the present specification, the object under test is a project program currently running in a program running container;
the creator test container loading the tested object may include:
a program test container is created that is independent of the program run container.
In an embodiment of the present disclosure, the extracting the execution link information of the tested object from the program test container may include:
analyzing by using the annotation, identifying a starting point and a method called by the starting point, and generating execution link information by using a reflection method.
In the embodiment of the present disclosure, the performing the performance test on the execution link information by using a preset performance evaluation rule may include:
the method corresponding to the execution link is operated in an orthomode, and execution performance data in the operation process is recorded;
and evaluating the execution performance data by using a preset performance evaluation rule.
In the embodiment of the present disclosure, the performing the performance test on the execution link information by using a preset performance evaluation rule may further include:
recording execution performance data in the process of running the sub-link of the execution link;
the evaluating the execution performance data by using a preset performance evaluation rule may include:
and evaluating the recorded execution performance data according to different levels of the links by using a preset performance evaluation rule.
In the embodiment of the present specification, the object under test has a plurality of modules;
the method for identifying a starting point and calling the starting point may include:
and reading each module of the tested object, and respectively identifying the starting point of each module and the method called by the starting point.
In the present embodiment, the test module 202 may also be used to:
and outputting the test result, wherein the test result is used for improving the execution node which does not meet the performance evaluation rule by a user.
In the embodiment of the present specification, the index of the performance evaluation rule has at least one of a degree of coupling and a degree of repetition.
The device creates a program test container to load an object to be tested, extracts execution link information of the object to be tested from the program test container, wherein the execution link information is provided with a plurality of execution nodes, performs performance test on the execution link information by using a preset performance evaluation rule, identifies the execution nodes which do not meet the performance evaluation rule, and generates a test result comprising the execution nodes. Because the method of creating the program test container to load the tested object and extracting the execution link information of the tested object from the program test container, no agent is needed to be planted in the project, thus reducing the interference to the tested object, and the positioning of the program short board or the abnormal cause is realized by carrying out performance test on the execution link information and identifying the execution nodes which do not meet the performance evaluation rule.
Based on the same inventive concept, the embodiments of the present specification also provide an electronic device.
The following describes an embodiment of an electronic device according to the present invention, which may be regarded as a specific physical implementation of the above-described embodiment of the method and apparatus according to the present invention. Details described in relation to the embodiments of the electronic device of the present invention should be considered as additions to the embodiments of the method or apparatus described above; for details not disclosed in the embodiments of the electronic device of the present invention, reference may be made to the above-described method or apparatus embodiments.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. An electronic device 300 according to this embodiment of the present invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 3, the electronic device 300 is embodied in the form of a general purpose computing device. Components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the different system components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code that is executable by the processing unit 310 such that the processing unit 310 performs the steps according to various exemplary embodiments of the invention described in the above processing method section of the present specification. For example, the processing unit 310 may perform the steps shown in fig. 1.
The memory unit 320 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 3201 and/or cache memory 3202, and may further include Read Only Memory (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 300, and/or any device (e.g., router, modem, etc.) that enables the electronic device 300 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 350. Also, electronic device 300 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 360. The network adapter 360 may communicate with other modules of the electronic device 300 via the bus 330. It should be appreciated that although not shown in fig. 3, other hardware and/or software modules may be used in connection with electronic device 300, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the exemplary embodiments described herein may be implemented in software, or may be implemented in software in combination with necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a computer readable storage medium (may be a CD-ROM, a usb disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-mentioned method according to the present invention. The computer program, when executed by a data processing device, enables the computer readable medium to carry out the above-described method of the present invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer readable medium according to an embodiment of the present disclosure.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in accordance with embodiments of the present invention may be implemented in practice using a general purpose data processing device such as a microprocessor or Digital Signal Processor (DSP). The present invention can also be implemented as an apparatus or device program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
The above-described specific embodiments further describe the objects, technical solutions and advantageous effects of the present invention in detail, and it should be understood that the present invention is not inherently related to any particular computer, virtual device or electronic apparatus, and various general-purpose devices may also implement the present invention. The foregoing description of the embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (12)

1. A method of testing program performance, comprising:
creating a program test container to load the tested object, namely creating the program test container independent of the program running container; the tested object is a project program currently running in the program running container;
extracting execution link information of the tested object from the program test container, wherein the execution link information is provided with a plurality of execution nodes;
performing performance test on the execution link information by using a preset performance evaluation rule, wherein the performance test method specifically comprises the following steps: the method corresponding to the execution link is operated in an orthomode, and execution performance data in the operation process are recorded according to different levels of the link; evaluating the recorded execution performance data according to different levels of links by using a preset performance evaluation rule;
and identifying the execution nodes which do not meet the performance evaluation rule, and generating a test result comprising the execution nodes.
2. The method of claim 1, wherein extracting execution link information of the object under test from the program test container comprises:
analyzing by using the annotation, identifying a starting point and a method called by the starting point, and generating execution link information by using a reflection method.
3. The method of claim 2, wherein the object under test has a plurality of modules;
the method for identifying the starting point and calling the starting point comprises the following steps:
and reading each module of the tested object, and respectively identifying the starting point of each module and the method called by the starting point.
4. The method as recited in claim 1, further comprising:
and outputting the test result, wherein the test result is used for improving the execution node which does not meet the performance evaluation rule by a user.
5. The method of claim 1, wherein the index of the performance evaluation rule has at least one of a degree of coupling and a degree of repetition.
6. An apparatus for testing program performance, comprising:
the container module is used for creating a program test container to load the tested object, namely creating the program test container independent of the program running container; the tested object is a project program currently running in the program running container;
extracting execution link information of the tested object from the program test container, wherein the execution link information is provided with a plurality of execution nodes;
the test module is used for performing performance test on the execution link information by using a preset performance evaluation rule, and specifically comprises the following steps: the method corresponding to the execution link is operated in an orthomode, and execution performance data in the operation process are recorded according to different levels of the link; evaluating the recorded execution performance data according to different levels of links by using a preset performance evaluation rule;
and identifying the execution nodes which do not meet the performance evaluation rule, and generating a test result comprising the execution nodes.
7. The apparatus of claim 6, wherein said extracting execution link information of said object under test from said program test container comprises:
analyzing by using the annotation, identifying a starting point and a method called by the starting point, and generating execution link information by using a reflection method.
8. The apparatus of claim 7, wherein the object under test has a plurality of modules;
the method for identifying the starting point and calling the starting point comprises the following steps:
and reading each module of the tested object, and respectively identifying the starting point of each module and the method called by the starting point.
9. The apparatus of claim 6, wherein the test module is further configured to:
and outputting the test result, wherein the test result is used for improving the execution node which does not meet the performance evaluation rule by a user.
10. The apparatus of claim 6, wherein the index of the performance evaluation rule has at least one of a degree of coupling and a degree of repetition.
11. An electronic device, wherein the electronic device comprises:
a processor; the method comprises the steps of,
a memory storing computer executable instructions that, when executed, cause the processor to perform the method of any of claims 1-5.
12. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-5.
CN202011149010.3A 2020-10-23 2020-10-23 Method and device for testing program performance and electronic equipment Active CN112286802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011149010.3A CN112286802B (en) 2020-10-23 2020-10-23 Method and device for testing program performance and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011149010.3A CN112286802B (en) 2020-10-23 2020-10-23 Method and device for testing program performance and electronic equipment

Publications (2)

Publication Number Publication Date
CN112286802A CN112286802A (en) 2021-01-29
CN112286802B true CN112286802B (en) 2023-04-25

Family

ID=74423874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011149010.3A Active CN112286802B (en) 2020-10-23 2020-10-23 Method and device for testing program performance and electronic equipment

Country Status (1)

Country Link
CN (1) CN112286802B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297072B (en) * 2021-05-17 2023-11-03 阿里巴巴新加坡控股有限公司 Container testing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102597964A (en) * 2009-09-25 2012-07-18 高通股份有限公司 A computing device for enabling concurrent testing
CN106021087A (en) * 2015-03-23 2016-10-12 阿里巴巴集团控股有限公司 Method and device for detecting code
CN109240662A (en) * 2018-08-09 2019-01-18 赛尔网络有限公司 A kind of software development methodology based on cloud platform, cloud platform, equipment and medium
CN110245064A (en) * 2018-03-08 2019-09-17 北京京东尚科信息技术有限公司 Object test method and its system, computer system and computer-readable medium
CN110647470A (en) * 2019-09-24 2020-01-03 网易(杭州)网络有限公司 Test method, manufacturing method, device, medium, and electronic apparatus
CN110888794A (en) * 2018-09-10 2020-03-17 北京京东尚科信息技术有限公司 Interface test method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102597964A (en) * 2009-09-25 2012-07-18 高通股份有限公司 A computing device for enabling concurrent testing
CN106021087A (en) * 2015-03-23 2016-10-12 阿里巴巴集团控股有限公司 Method and device for detecting code
CN110245064A (en) * 2018-03-08 2019-09-17 北京京东尚科信息技术有限公司 Object test method and its system, computer system and computer-readable medium
CN109240662A (en) * 2018-08-09 2019-01-18 赛尔网络有限公司 A kind of software development methodology based on cloud platform, cloud platform, equipment and medium
CN110888794A (en) * 2018-09-10 2020-03-17 北京京东尚科信息技术有限公司 Interface test method and device
CN110647470A (en) * 2019-09-24 2020-01-03 网易(杭州)网络有限公司 Test method, manufacturing method, device, medium, and electronic apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于龙芯平台的Docker评测与分析;吴平凡等;《计算机***应用》;20200415(第04期);第62-68页 *

Also Published As

Publication number Publication date
CN112286802A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
US11151018B2 (en) Method and apparatus for testing a code file
CN102279790B (en) Distributed debugging method and system
US9684786B2 (en) Monitoring an application in a process virtual machine
US20130117855A1 (en) Apparatus for automatically inspecting security of applications and method thereof
US9043653B2 (en) Introspection of software program components and conditional generation of memory dump
CN111488573A (en) Link library detection method and device, electronic equipment and computer readable storage medium
US9652358B1 (en) Type widening for source code analysis
Sottile et al. Semi-automatic extraction of software skeletons for benchmarking large-scale parallel applications
US11036527B2 (en) Class splitting in object-oriented environments
CN112286802B (en) Method and device for testing program performance and electronic equipment
US11263115B2 (en) Problem diagnosis technique of memory corruption based on regular expression generated during application compiling
CN112988578A (en) Automatic testing method and device
CN110188071B (en) Data processing method and device, electronic equipment and computer readable medium
US20110246967A1 (en) Methods and systems for automation framework extensibility
CN111488275A (en) UI automation test method and device, storage medium and electronic equipment
CN113377648B (en) Software system diagnosis method, device, electronic equipment and computer readable medium
CN115809193A (en) Front-end reverse abnormal data robustness detection method, device and storage medium
CN113141407B (en) Page resource loading method and device and electronic equipment
CN115291928A (en) Task automatic integration method and device of multiple technology stacks and electronic equipment
CN115292178A (en) Test data searching method, device, storage medium and terminal
CN110795338B (en) Front-end and back-end interaction-based automatic testing method and device and electronic equipment
CN111694729A (en) Application testing method and device, electronic equipment and computer readable medium
CN114174983A (en) Optimization for automatic verification of advanced constructs using test vectors
CN111338968A (en) Project function module debugging method, device, medium and electronic equipment
Habibi et al. Sharif-TaaWS: a tool to automate unit testing of web services

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant