CN112286802A - 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
CN112286802A
CN112286802A CN202011149010.3A CN202011149010A CN112286802A CN 112286802 A CN112286802 A CN 112286802A CN 202011149010 A CN202011149010 A CN 202011149010A CN 112286802 A CN112286802 A CN 112286802A
Authority
CN
China
Prior art keywords
execution
program
test
link information
performance
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.)
Granted
Application number
CN202011149010.3A
Other languages
Chinese (zh)
Other versions
CN112286802B (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, loading a tested object, extracting execution link information of the tested object from the program test container, carrying out performance test on the execution link information by using a preset performance evaluation rule, identifying execution nodes which do not meet the performance evaluation rule, and generating a test result comprising the execution nodes. Due to the mode 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, an agent does not need to be implanted into the project, so that the interference on the tested object is reduced, the execution nodes which do not meet the performance evaluation rule are identified by performing performance test on the execution link information, and the positioning of the program short board or the abnormal reason is realized.

Description

Method and device for testing program performance and electronic equipment
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for testing program performance, and an electronic device.
Background
The method for testing the program of the project is an effective method for improving the program, and most of the existing methods for testing the program of the project inject agents into the program of the project and record the performance status expressed when the program is executed subsequently.
However, while this approach also meets the testing needs of the project, there is still room for improvement.
The prior art is analyzed to find that the method is equivalent to treating the program of the tested project as a black box, the performance is obtained by testing, but the project cannot be evaluated according to the internal execution flow, so that the short board of the program or the abnormal reason is difficult to locate, and the method of injecting the agent into the program interferes with the program, and causes problems such as the execution efficiency of the affected project and the like.
Disclosure of Invention
The embodiment of the specification provides a method and a device for testing program performance and electronic equipment, 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, loading a tested object, and extracting execution link information of the tested object from the program test container, wherein the execution link information has 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 object to be tested is a project program currently running in the program running container;
the creating program test container loads the tested object, and comprises the following steps:
a program test container is created that is independent of the program run container.
Optionally, the extracting the execution link information of the object under test from the program test container includes:
and 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 performing, by using a preset performance evaluation rule, a performance test on the executed link information includes:
operating the method corresponding to the execution link in an orthographic mode, and recording execution performance data in the operation process;
and evaluating the execution performance data by utilizing a preset performance evaluation rule.
Optionally, the performing, by using a preset performance evaluation rule, a performance test on the executed link information further includes:
recording execution performance data in the process of operating 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 link by using a preset performance evaluation rule.
Optionally, 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.
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 the user.
Optionally, the index of the performance evaluation rule has at least one of a degree of coupling, a degree of repetition.
An embodiment of the present specification further provides an apparatus for testing program performance, including:
the system comprises a container module, a test execution module and a data processing module, wherein the container module is used for creating a program test container, loading a tested object and extracting execution link information of the tested object from the program test container, and the execution link information is provided with a plurality of execution nodes;
and the test module is used for 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 object to be tested is a project program currently running in the program running container;
the creating program test container loads the tested object, and comprises the following steps:
a program test container is created that is independent of the program run container.
Optionally, the extracting the execution link information of the object under test from the program test container includes:
and 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 performing, by using a preset performance evaluation rule, a performance test on the executed link information includes:
operating the method corresponding to the execution link in an orthographic mode, and recording execution performance data in the operation process;
and evaluating the execution performance data by utilizing a preset performance evaluation rule.
Optionally, the performing, by using a preset performance evaluation rule, a performance test on the executed link information further includes:
recording execution performance data in the process of operating 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 link by using a preset performance evaluation rule.
Optionally, 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.
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 the user.
Optionally, the index of the performance evaluation rule has at least one of a degree of coupling, a degree of repetition.
An embodiment of the present specification further provides an electronic device, where the electronic device includes:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present specification also provides a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement any of the above methods.
In various technical solutions provided in the embodiments of the present description, 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 has a plurality of execution nodes, a performance test is performed on the execution link information by using a preset performance evaluation rule, the execution nodes that do not satisfy the performance evaluation rule are identified, and a test result including the execution nodes is generated. Due to the mode 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, an agent does not need to be implanted into the project, so that the interference on the tested object is reduced, the execution nodes which do not meet the performance evaluation rule are identified by performing performance test on the execution link information, and the positioning of the program short board or the abnormal reason is realized.
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 embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram illustrating a method for testing performance of a program 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 provided in an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
Detailed Description
Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, may 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 denote the same or similar elements, components, or parts in the drawings, and thus their repetitive description will be omitted.
Features, structures, characteristics or other details described in a particular embodiment do not preclude the fact that the features, structures, characteristics or other details may be combined in a suitable manner in one or more other embodiments in accordance with the technical idea of the invention.
In describing particular embodiments, the present invention has been described with reference to features, structures, characteristics or other details that are within the purview of one skilled in the art to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific features, structures, characteristics, or other details.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to 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 actual execution sequence may be changed according to the actual situation.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
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 performance of a program according to an embodiment of the present disclosure, where the method may include:
s101: creating a program test container, loading a tested object, and extracting execution link information of the tested object from the program test container, wherein the execution link information comprises a plurality of execution nodes.
The tested object can be an on-line project program, in order to reduce the interference on the north side object and realize the test function by colleagues, a program test container can be created to load the tested object, and thus, the tested object in the program test container can be processed to realize the test.
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 the program running container is created by creating the running memory space for testing the tested object.
In order to reduce interference of a test process on a tested object, in an embodiment of the present specification, the tested object is a project program currently running in a program running container;
the creating a program test container to load the object to be tested may include:
a program test container is created that is independent of the program run container.
In order to increase the running speed of an object to be tested in a program running container and reduce the interference of a testing process on the running speed of the object to be tested, the program running container and the program testing container can be respectively established in a multi-core system, so that the program testing container and the program running container cannot occupy a time slice, and the interference of the testing process on the running speed of the object to be tested can be reduced.
Therefore, in this specification embodiment, creating a program test container independent of the program execution container may include:
and creating a program test container independent of the program running container in a kernel where a different program running container is located.
By creating separate program test containers, in-line 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, thereby accurately positioning the cause of program shortness or exception, an execution link of the tested object can be extracted first, when the tested object runs, the running condition of each node in the link is recorded by the hierarchy of the link nodes, and the cause of program shortness or exception is accurately positioned due to the fact that the recording hierarchy is refined.
In an embodiment of this specification, the extracting the execution link information of the object under test from the program test container may include:
and 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, the keywords of the tested object can be read, the starting method and the starting class of the tested object are identified according to the keywords of the tested object, classes labeled by different keywords are classified, and the method is read through reflection to obtain the execution link of the starting method. Therefore, the coupling degree between projects is avoided, and the execution efficiency of the projects is not influenced.
Reflection is in a running state, and all attributes and methods of any class can be known; for any object, any method and attribute of the object can be called; and can change its properties.
In the embodiment of the specification, the tested object is provided with a plurality of modules;
the method for identifying the starting point and the starting point call 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, and may be implemented by a spring framework, which is not specifically set forth 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 to load 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. Due to the mode 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, an agent does not need to be implanted into the project, so that the interference on the tested object is reduced, the execution nodes which do not meet the performance evaluation rule are identified by performing performance test on the execution link information, and the positioning of the program short board or the abnormal reason is realized.
In an embodiment of this specification, the performing, by using a preset performance evaluation rule, a performance test on the executed link information may include:
operating the method corresponding to the execution link in an orthographic mode, and recording execution performance data in the operation process;
and evaluating the execution performance data by utilizing a preset performance evaluation rule.
The recording of the execution performance data during the running process may be recording of the execution performance data through a queue.
The orthographic projection is a concept relative to reflection, and when a class related to reflection is not used, the orthographic projection is performed, for example, when a certain class needs to be used, what class is used is known first, and what function is provided.
In view of the fact that the logic implementation manner of the program may be complex, and the logic structure of the execution link may be complex, in this embodiment of the present specification, the 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 operating the sub-link of the execution link;
thus, the evaluating the execution performance data by using the preset performance evaluation rule may include:
and evaluating the recorded execution performance data according to different levels of the link by using a preset performance evaluation rule.
Therefore, the recorded execution performance data is evaluated according to different levels of the link, and the link level and the link node which cause the program short board can be accurately positioned.
In the embodiments 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 indexes describing the performance of the program when executed may be used as the indexes of the performance evaluation rule, and are not specifically set forth herein.
In the embodiment of the present specification, the method 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 the user.
In an embodiment of the present specification, the method may further include:
and drawing a visual execution link according to the execution link information, and prompting the execution nodes which do not meet the performance evaluation rule in the drawn visual execution link.
Therefore, testers can intuitively know the internal execution nodes of the program short board, the efficiency is improved, and the user experience is improved.
In an application scenario, when a currently running program of a tested object is tested, a program test container is created, a file of the tested object is loaded, a project program file is read, file analysis is performed depending on different annotations in spring, different levels of mvc are obtained, 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 obtaining a starting point through different annotations, drawing a corresponding execution path according to the called method, wherein in the process of drawing the corresponding execution path, the interference on the currently running tested object is small, and after the test, the running condition of an internal execution node of the tested object can be obtained, so that the program short board can be accurately positioned.
Fig. 2 is a schematic structural diagram of an apparatus for testing program performance provided in an embodiment of the present disclosure, where the apparatus may include:
a container module 201, which creates a program test container to load a tested object, and extracts execution link information of the tested object from the program test container, wherein the execution link information has a plurality of execution nodes;
the test module 202 performs a performance test on the execution link information by using a preset performance evaluation rule, identifies an execution node that does not satisfy the performance evaluation rule, and generates a test result including the execution node.
In an embodiment of the present specification, the object under test is a project program currently running in a program running container;
the creating a program test container to load the object to be tested may include:
a program test container is created that is independent of the program run container.
In an embodiment of this specification, the extracting the execution link information of the object under test from the program test container may include:
and 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 an embodiment of this specification, the performing, by using a preset performance evaluation rule, a performance test on the executed link information may include:
operating the method corresponding to the execution link in an orthographic mode, and recording execution performance data in the operation process;
and evaluating the execution performance data by utilizing a preset performance evaluation rule.
In this embodiment of the present specification, the performing a performance test on the executed link information by using a preset performance evaluation rule may further include:
recording execution performance data in the process of operating the sub-link of the execution link;
the evaluating the execution performance data by using the preset performance evaluation rule may include:
and evaluating the recorded execution performance data according to different levels of the link by using a preset performance evaluation rule.
In the embodiment of the specification, the tested object is provided with a plurality of modules;
the method for identifying the starting point and the starting point call 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 this embodiment, the test module 202 may further be 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 the user.
In the embodiments 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 a tested object, extracts 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, 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. Due to the mode 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, an agent does not need to be implanted into the project, so that the interference on the tested object is reduced, the execution nodes which do not meet the performance evaluation rule are identified by performing performance test on the execution link information, and the positioning of the program short board or the abnormal reason is realized.
Based on the same inventive concept, the embodiment of the specification further provides the electronic equipment.
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The 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 various 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 executable by the processing unit 310 to cause the processing unit 310 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned processing method section of the present specification. For example, the processing unit 310 may perform the steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache storage unit 3202, and may further include a read only memory unit (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 of which, or some combination thereof, may comprise 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.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. Network adapter 360 may communicate with other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. The computer program, when executed by a data processing apparatus, enables the computer readable medium to implement the above-described method of the invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
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. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc 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 propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and 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 for aspects 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 and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, 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., through 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 embodiments in accordance with the invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP). The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of testing performance of a program, comprising:
creating a program test container, loading a tested object, and extracting execution link information of the tested object from the program test container, wherein the execution link information has 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.
2. The method according to claim 1, wherein the object under test is a project program currently running in a program running container;
the creating program test container loads the tested object, and comprises the following steps:
a program test container is created that is independent of the program run container.
3. The method according to any one of claims 1-2, wherein said extracting the execution link information of the object under test from the program test container comprises:
and 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.
4. The method according to any one of claims 1-3, wherein the performing the performance test on the link information by using the preset performance evaluation rule comprises:
operating the method corresponding to the execution link in an orthographic mode, and recording execution performance data in the operation process;
and evaluating the execution performance data by utilizing a preset performance evaluation rule.
5. The method according to any one of claims 1-4, wherein the performing the performance test on the link information by using the preset performance evaluation rule further comprises:
recording execution performance data in the process of operating 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 link by using a preset performance evaluation rule.
6. The method of any of claims 1-5, 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.
7. The method according to any one of claims 1-6, 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 the user.
8. An apparatus for testing performance of a program, comprising:
the system comprises a container module, a test execution module and a data processing module, wherein the container module is used for creating a program test container, loading a tested object and extracting execution link information of the tested object from the program test container, and the execution link information is provided with a plurality of execution nodes;
and the test module is used for 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.
9. An electronic device, wherein the electronic device comprises:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-7.
10. 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-7.
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 true CN112286802A (en) 2021-01-29
CN112286802B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297072A (en) * 2021-05-17 2021-08-24 阿里巴巴新加坡控股有限公司 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评测与分析", 《计算机系统应用》 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN112286802B (en) 2023-04-25

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
US10613844B2 (en) Using comments of a program to provide optimizations
CN110858172A (en) Automatic test code generation method and device
US11144437B2 (en) Pre-populating continuous delivery test cases
US10839124B1 (en) Interactive compilation of software to a hardware language to satisfy formal verification constraints
US10380313B1 (en) Implementation and evaluation of designs for heterogeneous computing platforms with hardware acceleration
CN112286802A (en) Method and device for testing program performance and electronic equipment
CN113609008A (en) Test result analysis method and device and electronic equipment
US20120284695A1 (en) Error simulation
CN112988578A (en) Automatic testing method and device
US11263115B2 (en) Problem diagnosis technique of memory corruption based on regular expression generated during application compiling
CN110806969A (en) Test case integrity evaluation method and device and electronic equipment
CN111666201A (en) Regression testing method, device, medium and electronic equipment
CN110705637A (en) User classification method and device based on application installation list information and electronic equipment
CN114174983B (en) Method and system for optimized automatic verification of advanced constructs
CN110795338B (en) Front-end and back-end interaction-based automatic testing method and device and electronic equipment
CN114416029A (en) Data processing method, device, equipment, storage medium and computer program product
CN113377648B (en) Software system diagnosis method, device, electronic equipment and computer readable medium
Schwickerath et al. Tool-Supported Architecture-Based Data Flow Analysis for Confidentiality
CN113159584A (en) Quality inspection-based business strategy management method and device and electronic equipment
CN113568615A (en) Form page editing prohibition display method and device and electronic equipment
CN114817058A (en) Concurrent risk detection method and device, electronic equipment and storage medium
CN113254340A (en) Test case generation method and device

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