CN112306803A - Performance monitoring method and related equipment - Google Patents
Performance monitoring method and related equipment Download PDFInfo
- Publication number
- CN112306803A CN112306803A CN202011184063.9A CN202011184063A CN112306803A CN 112306803 A CN112306803 A CN 112306803A CN 202011184063 A CN202011184063 A CN 202011184063A CN 112306803 A CN112306803 A CN 112306803A
- Authority
- CN
- China
- Prior art keywords
- target
- class
- time
- log
- execution
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/103—Workflow collaboration or project management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
- G06F11/3419—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
- G06F16/1815—Journaling file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
Abstract
The application provides a performance monitoring method and related equipment, which can save problem troubleshooting time and improve troubleshooting efficiency of an ERP system when performing problem troubleshooting on an ERP. The method comprises the following steps: when a target class is instantiated, creating a target proxy class corresponding to the target class, wherein the target class is any one class in an ERP program and all methods of the target class are contained in the target proxy class; injecting log monitoring code into a first target method, wherein the first target method is any one method in the target agent class; when the first target method injected with the log monitoring code is called, generating a time-consuming statistical log of the first target method through the log monitoring code; and generating a performance analysis report corresponding to the target agent class based on the time-consuming statistical log of the first target method.
Description
Technical Field
The present application relates to the field of communications, and in particular, to a performance monitoring method and related device.
Background
An Enterprise application system, due to the complexity of Enterprise Resource Planning (ERP) business, has various business documents (such as purchase orders, sales orders, etc.), not only developers preset some general functions (including basic codes of a framework and plug-ins of business standards), but also third-party customers perform some secondary development (generally deployed on a server in the form of plug-ins) according to their business requirements; in the process of operating the system by a client, the problem of slow operation of the system may occur, for example, a very slow phenomenon occurs when auditing a purchase order is performed, and the system is often checked from several aspects: whether server resources are in shortage or not is checked, whether a user makes a two-way plug-in or not, a database server inquires a deadlock script and the like are checked.
The problem of slow performance is usually investigated, requiring intervention of multiple personnel: customer service personnel (understanding the slow phenomenon of customers), technical implementation personnel (checking various configuration troubleshooting problems and the like), operation and maintenance personnel (checking the occupation of server resources), data managers (checking the execution condition of a database), and technical development (writing a log component to further track problems); this increases the maintenance cost of an enterprise, and if the log component is to be written, the service is often restarted when the problem is solved, which also causes the interruption of the enterprise service and affects the normal operation of the enterprise.
Disclosure of Invention
The application provides a performance monitoring method and related equipment, which can save problem troubleshooting time and improve troubleshooting efficiency of an ERP system when performing problem troubleshooting on an ERP.
A first aspect of the present application provides a performance monitoring method, which is applied to an enterprise resource planning, ERP, program, and the performance monitoring method further includes:
when a target class is instantiated, creating a target proxy class corresponding to the target class, wherein the target class is any one class in an ERP program and all methods of the target class are contained in the target proxy class;
injecting log monitoring code into a first target method, wherein the first target method is any one method in the target agent class;
when the first target method injected with the log monitoring code is called, generating a time-consuming statistical log of the first target method through the log monitoring code;
and generating a performance analysis report corresponding to the target agent class based on the time-consuming statistical log of the first target method.
Optionally, the generating a performance analysis report corresponding to the target agent class based on the time-consuming statistical log of the first target method includes:
determining the execution time consumption of the first target method according to the time consumption statistical log of the first target method;
and generating a performance analysis report corresponding to the target agent class according to the execution time consumption of the first target method.
Optionally, the determining, according to the time-consuming statistical log of the first target method, that the execution of the first target method is time-consuming includes:
extracting the execution starting time of the first target method and the execution ending time of the first target method in the time-consuming statistical log;
and determining the execution time consumption of the first target method according to the execution starting time and the execution ending time.
Optionally, when a second target method through a structured query language SQL call interface exists in the target agent class, the performance analysis report corresponding to the target agent class includes execution time of all methods corresponding to the target agent class and SQL of the second target method.
Optionally, the creating a target agent class corresponding to the target class includes:
determining all methods of the target class;
and creating the target proxy class by means of class inheritance based on all methods of the target class, or creating the target proxy class by means of class packaging based on all methods of the target class.
A second aspect of the present application provides a performance monitoring apparatus, which is applied to an enterprise resource planning, ERP, program, and further includes:
the system comprises a creating unit, a calculating unit and a processing unit, wherein the creating unit is used for creating a target proxy class corresponding to a target class when the target class is instantiated, the target class is any one class in an ERP program, and the target proxy class comprises all methods of the target class;
a code injection unit, configured to inject a log monitoring code into a first target method, where the first target method is any one of the target agent classes;
the log generation unit is used for generating a time-consuming statistical log of the first target method through the diary monitoring code when the first target method injected with the diary monitoring code is called;
and the report generating unit is used for generating a performance analysis report corresponding to the target agent class based on the time-consuming statistic log of the first target method.
Optionally, the report generating unit is specifically configured to:
determining the execution time consumption of the first target method according to the time consumption statistical log of the first target method;
and generating a performance analysis report corresponding to the target agent class according to the execution time consumption of the first target method.
Optionally, the determining, by the report generation unit, the execution time consumption of the first target method according to the time consumption statistic log of the first target method includes:
extracting the execution starting time of the first target method and the execution ending time of the first target method in the time-consuming statistical log;
and determining the execution time consumption of the first target method according to the execution starting time and the execution ending time.
Optionally, when a second target method through a structured query language SQL call interface exists in the target agent class, the performance analysis report corresponding to the target agent class includes execution time of all methods corresponding to the target agent class and SQL of the second target method.
Optionally, the creating unit is specifically configured to:
determining all methods of the target class;
and creating the target proxy class by means of class inheritance based on all methods of the target class, or creating the target proxy class by means of class packaging based on all methods of the target class.
A third aspect of the present application provides a computer apparatus comprising at least one processor and a memory coupled to each other, wherein the memory is configured to store program code, which is loaded and executed by the processor to implement the steps of the performance monitoring method described above.
A fourth aspect of the present application provides a computer-readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the steps of the performance monitoring method described above.
In summary, it can be seen that, in the embodiment provided by the application, log monitoring codes are automatically injected into all the methods in the proxy class by creating the proxy class, then time-consuming statistical logs of all the methods are generated according to the log monitoring codes, and further a performance analysis report is obtained, so that when performing problem troubleshooting on ERP, the time for problem troubleshooting can be saved, and the troubleshooting efficiency of an ERP system is improved
Drawings
Fig. 1 is a schematic flowchart of a performance monitoring method according to an embodiment of the present application;
fig. 2 is a schematic view of a virtual structure of a performance monitoring apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a hardware structure of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprise," "include," and "have," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules expressly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus, the division of modules presented herein is merely a logical division that may be implemented in a practical application in a further manner, such that a plurality of modules may be combined or integrated into another system, or some feature vectors may be omitted, or not implemented, and such that couplings or direct couplings or communicative coupling between each other as shown or discussed may be through some interfaces, indirect couplings or communicative coupling between modules may be electrical or other similar, this application is not intended to be limiting. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present disclosure.
The terms referred to in this application are explained as follows:
1. plug-in components: the dynamic component is a dynamic component for the enterprise system in operation, and is convenient for a user to dynamically expand the self-defined function of the system;
2. secondary development: the client develops a specific plug-in according to the service requirement of the client based on the existing system;
3. class instantiation: instantiation refers to a process of creating an object by using a class in object-oriented programming, which is called instantiation, namely a process of embodying an abstract conceptual class into a real object of the class. The instantiation process is generally composed of a class name object name (new class name) (parameter 1, parameter 2.. parameter n).
4. The inheritance of the class is a concept in the object-oriented software technology, and is three basic characteristics of the object-oriented software technology together with the polymorphism and the encapsulation. Inheritance may cause a child to have the properties and methods of a parent class or redefine, append properties and methods, etc.
After the service system is deployed, all components in the service system are compiled and generated, once the system has a problem, the system is difficult to find, and the online debugging cannot be carried out, so that which link the problem occurs cannot be known; the ERP system architecture is usually a layered structure, and comprises a front-end layer, a business layer, a data layer and the like; problems often arise at the business and data levels.
The business layer mainly comprises a core layer of all businesses of the ERP system, business logic is basically realized on the layer, such as the submission of purchase orders, the examination and the like of the orders, and various complex verifiers, form services, standard business plug-ins preset by the system, business plug-ins opened by users and the like are bound on each operation; when the performance is slow, the problem of investigation is just like a large sea fishing needle, and the investigation can be carried out from various possible places, which wastes a lot of time.
In view of this, according to the performance monitoring method provided by the present application, when a target class is instantiated, a target agent class corresponding to the target class is created, and a log monitoring code is automatically injected into a method in the target agent class, so that when a method in the target agent class is called, a time-consuming statistical log of each method in the target agent class can be determined through the log monitoring code, and then a performance analysis report corresponding to the target agent class is generated according to the time-consuming statistical log. Compared with the existing method for troubleshooting through various possible places, log monitoring codes cannot be added manually in each method, the log monitoring codes are automatically injected in a proxy type creating mode, then time-consuming statistical logs are generated according to the log monitoring codes, and a performance analysis report is obtained.
The performance monitoring method provided by the present application is described below from the perspective of a performance monitoring device, which may be a server or a service unit in the server, and is not particularly limited.
Referring to fig. 1, fig. 1 is a schematic flow chart of a performance monitoring method according to an embodiment of the present application, including:
101. when the target class is instantiated, a target proxy class corresponding to the target class is created.
In this embodiment, the performance monitoring apparatus may create, when a target class is instantiated, a target agent class corresponding to the target class, where the target class is any one of the classes in the ERP program, the target class may be a plug-in class, the plug-in class may include, for example, a list plug-in class, a form plug-in class, a service operation plug-in class, and the like, and the target class may also be another class, such as a checker class, which is not limited specifically, as long as the target class is a class of the ERP program. The target agent class includes all methods of the target class, for example, the target class is a checker class, the checker class may include a checking method, a user may write corresponding logic in the checking method, and may perform a checking operation through the logic, for example, what logic passes checking and what logic does not pass checking, here, only the target class is taken as the checker class, the checker includes the checking method as an example for description, and of course, the checker may include other methods, which are not limited specifically. That is, the performance monitoring apparatus may create a proxy class of the target class when the target class is instantiated, the method included in the proxy class being the same as the method included in the target class.
It should be noted that, when creating the target agent class of the target class, the performance monitoring apparatus may first determine all methods included in the target class, and then create the target agent class in an inheritance manner of the class based on all methods included in the target class, or create the target agent class in a wrapping manner of the class based on all methods included in the target class, and of course, the performance monitoring apparatus may also create the agent class of the target class in other manners, which is not limited specifically, as long as the newly created class includes all methods in the target class.
102. Log monitoring code is injected into the first target method.
In this embodiment, the performance monitoring apparatus may inject the log monitoring code into a first target method, where the first target method is any one of methods in the target agent class. That is, the performance monitoring device may inject all methods in the target agent class into the log monitoring code.
It should be noted that, the method for triggering injection of the log monitoring code into the first target method is not limited specifically here, and for example, the method may be all methods that trigger injection of the log monitoring code into the first target method when the target agent class is created, or may also be a method that after the target agent class is created, batch injection of the log monitoring code into the target agent class by receiving an operation instruction of a user, as long as the log monitoring code can be injected into the first target method.
103. And when the first target method after the log monitoring code is injected is called, generating a time-consuming statistical log of the first target method through the log monitoring code.
In this embodiment, when the ERP program calls the first target method injected with the log monitoring code in the running process, the performance monitoring device may generate the time-consuming statistical log of the first target method through the log monitoring code. That is, when the first target method injected with the log monitoring code is called, the execution start time of the first target method and the execution end time of the first target method may be recorded by the log monitoring code, and then the time-consuming statistical log is generated based on the execution start time of the first target method and the execution end time of the first target method.
It should be noted that, when injecting the log monitoring code into the method of the target agent class, the log monitoring code may be injected into which method before which method is called, or the log monitoring code may be injected into all methods of the target agent class after the target agent class corresponding to the target class is created, which is not limited specifically.
104. And generating a performance analysis report corresponding to the target agent class based on the time-consuming statistical log of the first target method.
In this embodiment, after generating the time-consuming statistical log of the first target method, the performance monitoring apparatus may generate a performance analysis report corresponding to the target agent class based on the time-consuming statistical log of the first target method.
In one embodiment, the generating, by the performance monitoring apparatus, a performance analysis report corresponding to the target agent class based on the time-consuming statistical log of the first target method includes:
determining the execution time consumption of the first target method according to the time consumption statistical log of the first target method;
and generating a performance analysis report corresponding to the target agent class according to the execution time consumption of the first target method.
In this embodiment, the performance monitoring apparatus may determine execution time consumption of the first target method according to a time consumption statistical log of the first target method, that is, determine a total time taken by the first target method from start of execution to completion of execution, because when the target class is instantiated, the corresponding proxy class is generated, and the log monitoring code is injected into the proxy class, the time consumption statistical log of the first target method generated based on the log monitoring code may include an execution start time and an execution end time of the first target method, and when determining the execution time consumption of the first target method, the performance monitoring apparatus may extract the execution start time and the execution end time from the time consumption statistical log, and then may calculate the execution time consumption of the first target method; in this way, the performance monitoring apparatus may determine that the execution of all executed methods in the target agent class is time-consuming by using the method, and then generate a performance analysis report corresponding to the target agent class, that is, an analysis report that the execution of each executed method by the target agent class is time-consuming.
It should be noted that, when there is a second target method called through Structured Query Language (SQL) in the target proxy class, the performance analysis report corresponding to the target proxy class includes execution time of all methods corresponding to the target proxy class and SQL of the second target method. That is, when there is a second target method calling a corresponding interface in all methods of the target proxy class, the performance analysis report includes not only the execution time of the second target method, but also the usage SQL of the second target method when calling the corresponding interface.
In summary, it can be seen that in the embodiment provided by the application, log monitoring codes are automatically injected into all the methods in the proxy class by creating the proxy class, then time-consuming statistical logs of all the methods are generated according to the log monitoring codes, and further a performance analysis report is obtained.
The present application is described above from the perspective of a performance monitoring method, and the present application is described below from the perspective of a performance monitoring device.
Referring to fig. 2, fig. 2 is a schematic view of a virtual structure of a performance monitoring apparatus according to an embodiment of the present application, where the performance monitoring apparatus is applied to an enterprise resource planning, ERP, program, and the performance monitoring apparatus further includes:
a creating unit 201, configured to create, when a target class is instantiated, a target proxy class corresponding to the target class, where the target class is any one of the classes in the ERP program, and the target proxy class includes all methods of the target class;
a code injection unit 202, configured to inject a log monitoring code into a first target method, where the first target method is any one of the target agent classes;
a log generating unit 203, configured to generate a time-consuming statistical log of the first target method through the diary monitoring code when the first target method after the diary monitoring code is injected is called;
a report generating unit 204, configured to generate a performance analysis report corresponding to the target agent class based on the time-consuming statistics log of the first target method.
Optionally, the report generating unit 204 is specifically configured to:
determining the execution time consumption of the first target method according to the time consumption statistical log of the first target method;
and generating a performance analysis report corresponding to the target agent class according to the execution time consumption of the first target method.
Optionally, the determining, by the report generation unit 204, the execution time consumption of the first target method according to the time consumption statistic log of the first target method includes:
extracting the execution starting time of the first target method and the execution ending time of the first target method in the time-consuming statistical log;
and determining the execution time consumption of the first target method according to the execution starting time and the execution ending time.
Optionally, when a second target method through a structured query language SQL call interface exists in the target agent class, the performance analysis report corresponding to the target agent class includes execution time of all methods corresponding to the target agent class and SQL of the second target method.
Optionally, the creating unit 201 is specifically configured to:
determining all methods of the target class;
and creating the target proxy class by means of class inheritance based on all methods of the target class, or creating the target proxy class by means of class packaging based on all methods of the target class.
In summary, it can be seen that, in the embodiment provided by the application, log monitoring codes are automatically injected into all the methods in the proxy class by creating the proxy class, then time-consuming statistical logs of all the methods are generated according to the log monitoring codes, and further a performance analysis report is obtained, so that when performing problem troubleshooting on ERP, the time for problem troubleshooting can be saved, and the troubleshooting efficiency of an ERP system is improved
Fig. 3 is a schematic diagram of a server 300 according to an embodiment of the present application, where the server 300 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) for storing applications 342 or data 344. Memory 332 and storage media 330 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, the central processor 322 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the server 300.
The server 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and the like.
The steps performed by the performance monitoring apparatus in the above embodiment may be based on the server structure shown in fig. 3.
An embodiment of the present application further provides a computer-readable storage medium, on which a program is stored, and the program, when executed by a processor, implements the steps of the performance monitoring method described above.
The embodiment of the present application further provides a processor, where the processor is configured to execute a program, where the program executes the steps of the performance monitoring method when running.
The embodiment of the present application further provides a terminal device, where the device includes a processor, a memory, and a program stored in the memory and capable of running on the processor, and the program code is loaded and executed by the processor to implement the steps of the performance monitoring method.
The present application further provides a computer program product adapted to perform the steps of the above described performance monitoring method when executed on a data processing device.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are 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 performance monitoring method is applied to an Enterprise Resource Planning (ERP) program and is characterized by comprising the following steps:
when a target class is instantiated, creating a target proxy class corresponding to the target class, wherein the target class is any one class in an ERP program and all methods of the target class are contained in the target proxy class;
injecting log monitoring code into a first target method, wherein the first target method is any one method in the target agent class;
when the first target method injected with the log monitoring code is called, generating a time-consuming statistical log of the first target method through the log monitoring code;
and generating a performance analysis report corresponding to the target agent class based on the time-consuming statistical log of the first target method.
2. The method of claim 1, wherein generating the performance analysis report corresponding to the target agent class based on the time-consuming statistics log of the first target method comprises:
determining the execution time consumption of the first target method according to the time consumption statistical log of the first target method;
and generating a performance analysis report corresponding to the target agent class according to the execution time consumption of the first target method.
3. The method of claim 2, wherein determining the execution time of the first target method from the time-consuming statistical log of the first target method comprises:
extracting the execution starting time of the first target method and the execution ending time of the first target method in the time-consuming statistical log;
and determining the execution time consumption of the first target method according to the execution starting time and the execution ending time.
4. The method according to any one of claims 1 to 3, wherein when a second target method through a Structured Query Language (SQL) call interface exists in the target proxy class, the performance analysis report corresponding to the target proxy class comprises execution time of all methods corresponding to the target proxy class and SQL of the second target method.
5. The method according to any one of claims 1 to 3, wherein the creating the target proxy class corresponding to the target class comprises:
determining all methods of the target class;
and creating the target proxy class by means of class inheritance based on all methods of the target class, or creating the target proxy class by means of class packaging based on all methods of the target class.
6. A performance monitoring device is applied to an Enterprise Resource Planning (ERP) program and is characterized by comprising the following components:
the system comprises a creating unit, a calculating unit and a processing unit, wherein the creating unit is used for creating a target proxy class corresponding to a target class when the target class is instantiated, the target class is any one class in an ERP program, and the target proxy class comprises all methods of the target class;
a code injection unit, configured to inject a log monitoring code into a first target method, where the first target method is any one of the target agent classes;
the log generation unit is used for generating a time-consuming statistical log of the first target method through the diary monitoring code when the first target method injected with the diary monitoring code is called;
and the report generating unit is used for generating a performance analysis report corresponding to the target agent class based on the time-consuming statistic log of the first target method.
7. The apparatus according to claim 6, wherein the report generating unit is specifically configured to:
determining the execution time consumption of the first target method according to the time consumption statistical log of the first target method;
and generating a performance analysis report corresponding to the target agent class according to the execution time consumption of the first target method.
8. The apparatus of claim 7, wherein the report generation unit determining the execution time of the first target method according to the time consumption statistic log of the first target method comprises:
extracting the execution starting time of the first target method and the execution ending time of the first target method in the time-consuming statistical log;
and determining the execution time consumption of the first target method according to the execution starting time and the execution ending time.
9. A computer device, comprising:
at least one processor and a memory coupled to store program code, wherein the program code is loaded and executed by the processor to implement the steps of the performance monitoring method of any of the preceding claims 1 to 5.
10. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the steps of the performance monitoring method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011184063.9A CN112306803A (en) | 2020-10-29 | 2020-10-29 | Performance monitoring method and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011184063.9A CN112306803A (en) | 2020-10-29 | 2020-10-29 | Performance monitoring method and related equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112306803A true CN112306803A (en) | 2021-02-02 |
Family
ID=74332213
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011184063.9A Pending CN112306803A (en) | 2020-10-29 | 2020-10-29 | Performance monitoring method and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112306803A (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130096880A1 (en) * | 2010-09-07 | 2013-04-18 | Hyundai Motor Company | System test method |
CN103761474A (en) * | 2014-01-24 | 2014-04-30 | 北京京东尚科信息技术有限公司 | Method and device for monitoring execution time of monitoring method |
CN105278996A (en) * | 2015-11-03 | 2016-01-27 | 亚信科技(南京)有限公司 | Log collection method and device and log service system |
CN107423203A (en) * | 2017-04-19 | 2017-12-01 | 浙江大学 | Non-intrusion type Hadoop applied performance analysis apparatus and method |
CN108446224A (en) * | 2018-03-06 | 2018-08-24 | 福建天泉教育科技有限公司 | The method for analyzing performance, storage medium of application program on mobile terminal |
CN109522189A (en) * | 2017-09-19 | 2019-03-26 | 北京国双科技有限公司 | A kind of data monitoring method, apparatus and system |
CN109740345A (en) * | 2018-12-26 | 2019-05-10 | 北京神州绿盟信息安全科技股份有限公司 | A kind of method and device of monitoring process |
CN109918260A (en) * | 2019-01-24 | 2019-06-21 | 平安科技(深圳)有限公司 | A kind of monitoring method and device of item code |
CN110908880A (en) * | 2019-11-01 | 2020-03-24 | 北京金山安全软件有限公司 | Embedded point code injection method, event reporting method and related equipment thereof |
CN110990228A (en) * | 2019-12-13 | 2020-04-10 | 集奥聚合(北京)人工智能科技有限公司 | Data interface monitoring method and device |
CN111124906A (en) * | 2019-12-17 | 2020-05-08 | 支付宝(杭州)信息技术有限公司 | Tracking method, compiling method and device based on dynamic embedded points and electronic equipment |
CN111367768A (en) * | 2020-03-30 | 2020-07-03 | 中国建设银行股份有限公司 | Method and device for monitoring function response time of program |
-
2020
- 2020-10-29 CN CN202011184063.9A patent/CN112306803A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130096880A1 (en) * | 2010-09-07 | 2013-04-18 | Hyundai Motor Company | System test method |
CN103761474A (en) * | 2014-01-24 | 2014-04-30 | 北京京东尚科信息技术有限公司 | Method and device for monitoring execution time of monitoring method |
CN105278996A (en) * | 2015-11-03 | 2016-01-27 | 亚信科技(南京)有限公司 | Log collection method and device and log service system |
CN107423203A (en) * | 2017-04-19 | 2017-12-01 | 浙江大学 | Non-intrusion type Hadoop applied performance analysis apparatus and method |
CN109522189A (en) * | 2017-09-19 | 2019-03-26 | 北京国双科技有限公司 | A kind of data monitoring method, apparatus and system |
CN108446224A (en) * | 2018-03-06 | 2018-08-24 | 福建天泉教育科技有限公司 | The method for analyzing performance, storage medium of application program on mobile terminal |
CN109740345A (en) * | 2018-12-26 | 2019-05-10 | 北京神州绿盟信息安全科技股份有限公司 | A kind of method and device of monitoring process |
CN109918260A (en) * | 2019-01-24 | 2019-06-21 | 平安科技(深圳)有限公司 | A kind of monitoring method and device of item code |
CN110908880A (en) * | 2019-11-01 | 2020-03-24 | 北京金山安全软件有限公司 | Embedded point code injection method, event reporting method and related equipment thereof |
CN110990228A (en) * | 2019-12-13 | 2020-04-10 | 集奥聚合(北京)人工智能科技有限公司 | Data interface monitoring method and device |
CN111124906A (en) * | 2019-12-17 | 2020-05-08 | 支付宝(杭州)信息技术有限公司 | Tracking method, compiling method and device based on dynamic embedded points and electronic equipment |
CN111367768A (en) * | 2020-03-30 | 2020-07-03 | 中国建设银行股份有限公司 | Method and device for monitoring function response time of program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9697104B2 (en) | End-to end tracing and logging | |
CN107483221B (en) | Cross-application problem troubleshooting method, device and system | |
CN109032825B (en) | Fault injection method, device and equipment | |
US20090177926A1 (en) | Incident simulation support environment | |
CN105184166A (en) | Kernel-based Android application real-time behavior analysis method and system | |
CN104168250B (en) | Business Process Control method and device based on CGI frames | |
US10241902B2 (en) | Systems and methods for benchmark based cross platform service demand prediction | |
EP3462330A1 (en) | Fault tolerant adapter system to consume database as a service | |
CN103186463B (en) | Determine the method and system of the test specification of software | |
CN112187933A (en) | Method and system for monitoring services in multi-architecture cloud platform | |
US10951540B1 (en) | Capture and execution of provider network tasks | |
CN110941632A (en) | Database auditing method, device and equipment | |
CN117290250A (en) | Automatic test framework establishment method, computer equipment and computer storage medium | |
CN111435327B (en) | Log record processing method, device and system | |
CN112306803A (en) | Performance monitoring method and related equipment | |
US10509659B1 (en) | Input processing logic to produce outputs for downstream systems using configurations | |
CN114791884A (en) | Test environment construction method and device, storage medium and electronic equipment | |
CN112181407B (en) | Service realization processing method, device, system, electronic equipment and storage medium | |
CN111045891B (en) | Monitoring method, device, equipment and storage medium based on java multithreading | |
Imran et al. | The impact of auto-refactoring code smells on the resource utilization of cloud software | |
CN111881056A (en) | Automatic test framework and test method | |
CN109840213A (en) | A kind of test data creation method, apparatus, terminal and the storage medium of GUI test | |
CN111158873A (en) | System state machine implementation method and device, storage medium and processor | |
CN112422308A (en) | Method and device for realizing operation and maintenance monitoring | |
CN105955885B (en) | A kind of workflow automation tests system and method |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210202 |