CN112559090B - Method and related device for collecting performance events during running of application program - Google Patents

Method and related device for collecting performance events during running of application program Download PDF

Info

Publication number
CN112559090B
CN112559090B CN202011437005.2A CN202011437005A CN112559090B CN 112559090 B CN112559090 B CN 112559090B CN 202011437005 A CN202011437005 A CN 202011437005A CN 112559090 B CN112559090 B CN 112559090B
Authority
CN
China
Prior art keywords
script
application program
calling
application
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011437005.2A
Other languages
Chinese (zh)
Other versions
CN112559090A (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.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
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 Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN202011437005.2A priority Critical patent/CN112559090B/en
Publication of CN112559090A publication Critical patent/CN112559090A/en
Application granted granted Critical
Publication of CN112559090B publication Critical patent/CN112559090B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

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

Abstract

The application discloses a method for collecting performance events during application program running, which comprises the following steps: writing an automatic script in the server; calling an application program configuration script by using the automation script, and downloading an application program to be tested according to the application program configuration script; calling an action execution script by using the automation script, and executing corresponding actions on the application program to be tested according to the action execution script; the method comprises the steps of calling a system tracking script and a log obtaining script by utilizing an automatic script to obtain a first process identifier in a corresponding action process of an application program to be tested; and calling an action execution script by utilizing the automation script so that the server acquires the performance event identified by the first process. By the method, a plurality of specific application programs can be designated for installation at the same time, the designated application programs can be automatically operated after installation, corresponding actions can be independently and regularly executed, and efficiency and accuracy of collecting performance events during application program operation are improved.

Description

Method and related device for collecting performance events during running of application program
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for collecting performance events during application program running.
Background
With the development of computer technology, mobile terminals such as mobile phones and tablets rapidly enter thousands of households, the update of application programs is faster and faster, the requirements of users on the application programs are also increased, and the performance indexes of the application programs such as system fluency, low memory consumption, low blocking, rapid starting and the like become an important ring of high-quality products. Thus, the collection of performance events at application runtime is important for studying and analyzing the microarchitecture of the cell phone processor.
In the prior art, in the process of installing an application program to a terminal through an android debug bridge, a test instruction or a script is required to be sent to the terminal through data line connection or wireless connection, but a plurality of specific application programs cannot be designated for installation at the same time, the designated application programs cannot be automatically operated after installation, and moreover, the user actions tested by the mobile terminal have diversity and are difficult to independently and regularly execute a certain action, so that the efficiency and the accuracy of collecting performance events cannot be improved.
Disclosure of Invention
The application mainly solves the technical problem of providing a method and a related device for collecting performance events when an application program runs, so as to improve the efficiency and the accuracy of collecting the performance events when the application program runs.
In order to solve the technical problems, the application adopts the following scheme: provided is a method for collecting performance events during application program running, comprising the following steps: writing an automatic script in the server; calling an application program configuration script by using the automation script, and downloading an application program to be tested according to the application program configuration script; calling an action execution script by using the automatic script, and executing corresponding actions on the application program to be tested according to the action execution script; the automatic script is utilized to call a system tracking script and a log acquisition script so as to obtain a first process identifier in the corresponding action process of the application program to be tested; and calling the action execution script by utilizing the automation script so that the server acquires the performance event identified by the first process.
The step of calling an application program configuration script by using the automation script and downloading the application program to be tested according to the application program configuration script comprises the following steps: acquiring the file name of an installation package of the application to be tested according to the application configuration script; setting a download configuration file of a browser, and initializing a browser instance with the download configuration file; and acquiring the download address of the installation package from the download configuration file so as to install the application program to be tested.
The step of calling an action execution script by using the automation script and executing a corresponding action on the application program to be tested according to the action execution script comprises the following steps: judging whether the appointed transmission port of the server is occupied or not; if yes, releasing the appointed transmission port; and creating a second process identifier of the appointed transmission port through the subprocess module, and creating a socket on the appointed transmission port so as to carry out communication data transmission.
The step of calling a system tracking script and a log obtaining script by using the automation script to obtain a first process identifier in a corresponding action process of the application program to be tested comprises the following steps: calling the system tracking script and the log acquisition script by using the automation script to obtain operation data in the corresponding action process of the application program to be tested so as to obtain a log file; and obtaining the first process identifier of which the consumption of the central processing unit of the server is higher than a threshold value in the corresponding action process of the application program to be tested according to the log file.
The step of calling the action execution script by using the automation script to enable the server to collect the performance event identified by the first process comprises the following steps: writing the login parameters of the corresponding actions into a configuration file, reading the configuration file and sending the configuration file to the nodes operated by the corresponding actions.
The step of calling the action execution script by using the automation script to enable the server to collect the performance event identified by the first process includes: and calling the action execution script by using the automation script, and setting configuration information on a session control interface of the action execution script, wherein the configuration information comprises: platform name, platform version, equipment name, automation name and installation package of the application program to be tested; and the server acquires the performance event identified by the first process by utilizing the action execution script.
Wherein the actions include at least one of cold start, sliding, switching, bright screen, and off screen; and/or the log file includes a central processing unit schedule, disk activity, and application threads.
In order to solve the technical problems, the application adopts another scheme that: there is provided an apparatus for collecting performance events when an application program runs, comprising: the application preparation module is used for writing an automatic script in the server; calling an application program configuration script by using the automation script, and downloading an application program to be tested according to the application program configuration script; the interaction action selection module is used for calling an action execution script by utilizing the automation script and executing corresponding actions on the application program to be tested according to the action execution script; the process selection module is used for calling a system tracking script and a log acquisition script by using the automatic script so as to obtain a first process identifier in the corresponding action process of the application program to be tested; and the data acquisition module is used for calling the action execution script by utilizing the automation script so that the server side acquires the performance event identified by the first process.
In order to solve the technical problem, the application adopts the following scheme: providing a computer device comprising a memory and a processor coupled to each other; the memory is used for storing a computer program; the processor is configured to execute the computer program to implement the collection method according to any of the embodiments described above.
In order to solve the technical problem, the application adopts the following scheme: a computer-readable storage medium storing a computer program for implementing the collection method according to any one of the above embodiments.
Unlike the prior art, the application has the beneficial effects that: according to the method, an automatic script is written in a server, the automatic script is utilized to call an application program configuration script, the application program to be tested is downloaded according to the application program configuration script, an action execution script is utilized to call the action execution script, corresponding actions are executed on the application program to be tested according to the action execution script, a log is utilized to call the log to obtain the script, so that a first process identifier in the corresponding action process of the application program to be tested is obtained, and the action execution script is utilized to call the action execution script, so that the server collects performance events of the first process identifier. By the method, a plurality of specific application programs can be designated for installation at the same time, the designated application programs can be automatically operated after installation, corresponding actions can be independently and regularly executed, and efficiency and accuracy of collecting performance events during application program operation are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a flow chart of one embodiment of a method for collecting performance events during application runtime of the present application;
FIG. 2 is a flow chart of an embodiment of step S2 in FIG. 1;
FIG. 3 is a flowchart illustrating an embodiment of the step prior to the step S3 in FIG. 1;
FIG. 4 is a flowchart of an embodiment of step S4 in FIG. 1;
FIG. 5 is a flowchart illustrating the step S5 of FIG. 1;
FIG. 6 is a schematic diagram of a framework of one embodiment of a collection device for runtime performance events of an application of the present application;
FIG. 7 is a schematic diagram of a computer device according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a framework of an embodiment of a computer readable storage medium of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a flowchart illustrating an embodiment of a method for collecting performance events during an application program running process according to the present application. The steps include:
s1: and writing an automation script auto. Sh in the server.
Specifically, in this embodiment, the automation script auto. Sh may call other scripts in the solution, for example, the other scripts may be an application configuration script apkconfig. Py, an action execution script app ium. Py, a system tracking script sys exact. Py, a log acquisition script trace. Html, and so on. Before testing, an android debug bridge ADB is required to be installed in a server and a mobile terminal, and the android debug bridge ADB is a universal debugging tool provided by android, and can be used for well debugging and developing application programs. The method comprises the steps that communication connection is established between a server and a mobile terminal, and an android installation package can be installed on the server through an android debug bridge ADB, so that the server obtains a corresponding application program, and performance events of a system process when the application program runs different actions are collected. Specifically, the server and the mobile terminal can be connected through a data line. Of course, in other embodiments, the connection may be by other means, not limited herein.
In this embodiment, the mobile terminal may be a mobile phone or the like, which is not limited in the present application. The operating system may include Windows, linux, etc., without limitation. The server may include a physical machine, a virtual machine, etc., which the present application is not limited to. The automation script auto. Sh and other scripts may be written by shell script to customize configuration parameters of the automation collection performance event, however, in other embodiments, the automation script auto. Sh and other scripts may be written by python script, which is not limited herein.
S2: and calling the application program configuration script APKConfig. py by utilizing the automation script auto. Sh, and downloading the application program to be tested according to the application program configuration script APKConfig. py.
In this embodiment, the application to be tested may be a Web application, such as a ticket assistant opened through a browser, a recharging ease, etc. Of course, the application to be tested may also be a native application, such as cool dog music, a beauty show, etc. Of course, in other embodiments, the application to be tested may be a hybrid application, such as a cat, a carrier, a 58 city, etc., which is not limited by the present application.
Specifically, the application configuration script apkconfig. py is called by using the automation script auto. Sh in the above step S1, so as to realize the step of downloading the application to be tested according to the application configuration script apkconfig. py. Specifically, referring to fig. 2, fig. 2 is a flow chart illustrating an embodiment of step S2 in fig. 1. The step S2 specifically includes:
S101: and obtaining the file name of the installation package of the application to be tested according to the application configuration script APKConfig.
Specifically, in this embodiment, the installation package folder is scanned according to the application configuration script apkconfig. py to obtain the file name of the installation package of the application to be tested, where the installation package folder is the latest application installation package. In this way, the file name of the installation package of the application to be tested can be automatically acquired for subsequent steps.
S102: setting a download configuration file of the browser, and initializing a browser instance with the download configuration file.
Specifically, the download configuration file includes configuration parameters required when the browser downloads an installation package of the application to be tested, for example, a name of the installation package, and the like. The browser may be google browser, or other browsers, for example, hundred degrees, firefox, dog searching, etc., which is not limited in the present application. By initializing a browser instance with a download configuration file, the corresponding installation package of the application program to be tested can be downloaded according to the configuration parameters.
S103: and acquiring the download address of the installation package from the download configuration file to install the application program to be tested.
Specifically, in this embodiment, after the download address of the installation package is obtained from the download configuration file in step S102, the user may operate on the server to install the application to be tested, and of course, in other embodiments, the application configuration script apkconfig. py may be called by the automation script auto. In this way, the application to be tested can be installed quickly and accurately.
S3: and calling an action execution script Apium. Py by using the automation script auto. Sh, and executing corresponding actions on the application program to be tested according to the action execution script Apium. Py.
Specifically, an automation script auto. Sh is utilized to call an action execution script appium. Py, which may include a start. Sh script to be responsible for the application under test to execute the corresponding action. Specifically, the above-mentioned actions may be one of cold start, sliding, switching, bright screen and off screen, and of course, in other embodiments, the above-mentioned actions may be two or more of cold start, sliding, switching, bright screen and off screen, which is not limited in this application. And (3) calling an action execution script Apium. Py by using the automation script auto. Sh in the step S1, and continuously and uninterruptedly executing corresponding actions on the application program to be tested according to the action execution script Apium. Py.
In this embodiment, the action execution script, appium. Py, is responsible for invoking Appium the tool. In order to automatically start Appium the tool at the server to enable the application to be tested to execute the corresponding action, please refer to fig. 3, fig. 3 is a flowchart illustrating an embodiment of the steps before step S3 in fig. 1. The steps before the step S3 specifically include:
S201: judging whether the appointed transmission port of the server is occupied.
S202: if yes, releasing the appointed transmission port.
If the appointed transmission port of the server is detected to be occupied, releasing the appointed transmission port and implementing step S203; if the designated transmission port is unoccupied, step S203 is directly performed.
S203: and creating a second process identifier of the appointed transmission port through the subprocess module, and creating a socket at the appointed transmission port so as to carry out communication data transmission.
In this way, the tool may be automatically started Appium at the server, so that the application to be tested performs the corresponding action.
S4: and tracking the script system.py and the log by using an automatic script auto.sh calling system to obtain script system.html so as to obtain a first process identifier in the corresponding action process of the application program to be tested.
Specifically, in the present embodiment, referring to fig. 4, fig. 4 is a flow chart of an implementation of step S4 in fig. 1. The step S4 specifically comprises the following steps:
s301: and (3) tracking the script system template.py and obtaining script template.html by using an automatic script auto.sh calling system to obtain operation data in the corresponding action process of the application program to be tested so as to obtain a log file.
And tracking a script System trace. Py by using an automatic script Auto. Sh call system, starting Systrace a tool, wherein the process is to start trace by using Dalvik Debug Monitor Service (DDMS) to track the running data of a system process in an operating system kernel in the corresponding action process of an application program to be tested, acquiring script. Html by using an automatic script auto. Sh call log, and collecting the running data according to the log acquiring script. Html to obtain a log file. In this embodiment, the log file may include a central processing unit CPU schedule, a disk activity, and an application thread. Of course, in other embodiments, the log file may also include information of other system processes, which is not limited herein. Through the design scheme, all conditions of the system processes in the operating system kernel in the designated time can be automatically acquired, and the log file is generated, so that a user can conveniently check all conditions of the system processes in the operating system kernel in real time.
S302: and obtaining a first process identifier of which the CPU consumption of the server side is higher than a threshold value in the corresponding action process of the application program to be tested according to the log file.
Specifically, command line parameters are set Systrace, and a first process identifier that the CPU consumption of the server is higher than a threshold value in the corresponding action process of the application program to be tested is obtained according to all conditions of the system process in the log file. Of course, in other embodiments, the first process identifier of other conditions in the corresponding action process of the application program to be tested may also be obtained according to the conditions of the system process in the log file, and only the command line parameter needs to be changed Systrace.
By the method, the first process identifier of which the CPU consumption of the server side is higher than the threshold value in the corresponding action process of the application program to be detected can be automatically acquired.
S5: and executing the script Apium. Py by utilizing the automation script auto. Sh calling action so as to enable the server to collect the performance event identified by the first process.
Specifically, referring to fig. 5, fig. 5 is a flow chart of an embodiment of step S5 in fig. 1. The step S5 specifically comprises the following steps:
S401: and calling an action execution script Apium. Py by using an automation script auto. Sh, and setting configuration information on a session control interface of the action execution script Apium. Py.
And calling an action execution script Aptium. Py by using an automation script auto. Sh, wherein the action execution script Aptium. Py provides an application program interface, an application program to be tested makes the application program to perform corresponding actions by calling the application program interface, and setting configuration information on a session control interface of the action execution script Aptium. Py so as to screen out performance events to be tested when the application program to be tested performs the corresponding actions, and the configuration information comprises: platform name, platform version, device name, automation name, and installation package of the application to be tested.
S402: the server acquires the performance event identified by the first process by using an action execution script Apium.
Specifically, in this embodiment, in the dynamic configuration section, when the application program to be tested performs a corresponding action, the performance event collection tool is applied to the action execution script app.py, and the performance event collection tool may be SIMPLEPERF tools or the like. The SIMPLEPERF tool comprises a client and a host, wherein the client operates on a system of the mobile terminal and is responsible for collecting performance events, and the host operates on a server and is responsible for analyzing and visualizing the collected performance events. The server acquires the performance event identified by the first process by using the action execution script Aptium. Py and outputs the performance event in the form of an event. Txt file, so that a reference is provided for a user. And finally, clearing the cache at the server by utilizing Systrace tools so as to ensure the smoothness of the subsequent operation.
In order to ensure the consistency of the node configuration parameters of the corresponding action operation, before step S5, the method further includes: and writing the login parameters of the corresponding actions into the configuration file, reading the configuration file and sending the configuration file to the nodes operated by the corresponding actions.
Specifically, the login parameters include a control ID, a login password, and the like. In the static configuration part, login parameters such as control ID, login password and the like are written into a configuration file, the configuration file is read and sent to a node operated by a corresponding action, so that consistency of the configuration parameters of the node operated by the corresponding action is ensured, and when an application program to be tested is operated and different actions are executed, the application program to be tested can automatically log in, so that the aim of automatically collecting performance events is fulfilled.
By the method, the user can automatically select the performance event to be collected by only running the corresponding script and setting the corresponding parameter, so that the method can be suitable for the automatic identification of the processors of different mobile terminals and the automatic selection of different actions of running different application programs by the processors of the same mobile terminal, and not only is the efficiency of collecting the performance event improved, but also the accuracy of collecting the performance event is improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a device for collecting performance events during application program running in accordance with the present application. The apparatus includes an application preparation module 10, an interaction selection module 12, a process selection module 14, and a data acquisition module 16. The application preparation module 10 is configured to write an automation script auto. Sh in the server, call an application configuration script apkconfig. py using the automation script auto. Sh, and download an application to be tested according to the application configuration script apkconfig. py. The interaction action selection module 12 invokes an action execution script appium. Py with the automation script auto. Sh, and executes corresponding actions on the application to be tested according to the action execution script appium. Py. The process selection module 14 uses the automation script auto. Sh to call the system trace script system. Py and the log to obtain script trace. Html to obtain the first process identifier in the corresponding action process of the application to be tested. The data collection module 16 executes the script app.py using the automation script auto. Sh call action to cause the server to collect the performance event identified by the first process.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the application. The apparatus includes a memory 200 and a processor 202 coupled to each other; the memory 200 is used for storing a computer program; the processor 202 is configured to execute a computer program to implement the collection method mentioned in any of the embodiments above.
Specifically, the processor 202 may also be referred to as a CPU (Central Processing Unit ). The processor 202 may be an integrated circuit chip with signal processing capabilities. The Processor 202 may also be a general purpose Processor, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), an Application SPECIFIC INTEGRATED Circuit (ASIC), a Field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 202 may be commonly implemented by a plurality of integrated circuit chips.
Referring to fig. 8, fig. 8 is a schematic diagram illustrating a frame of an embodiment of a computer readable storage medium according to the present application. The apparatus computer readable storage medium 30 stores a computer program 300, the computer program 300 being for implementing the collecting method mentioned in any of the above embodiments. The program instructions 300 may be stored in the storage device described above in the form of a software product, and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods according to the embodiments of the present application. The aforementioned storage device includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes, or a terminal device such as a computer, a server, a mobile phone, a tablet, or the like.
In summary, unlike the prior art, the present application can simultaneously designate a plurality of specific applications for installation through a series of automation methods, automatically operate the designated applications after installation, and individually and regularly execute corresponding actions, thereby improving efficiency and accuracy of collecting performance events when the applications are operated.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and the drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the present application.

Claims (7)

1. A method for collecting performance events during application program operation, comprising:
writing an automatic script in the server;
Calling an application program configuration script by using the automation script, and downloading an application program to be tested according to the application program configuration script;
Calling an action execution script by using the automatic script, and executing corresponding actions on the application program to be tested according to the action execution script;
the automatic script is utilized to call a system tracking script and a log acquisition script so as to obtain a first process identifier in the corresponding action process of the application program to be tested;
Writing the login parameters of the corresponding actions into a configuration file, reading the configuration file and sending the configuration file to the nodes operated by the corresponding actions so as to enable the configuration parameters of the nodes operated by the corresponding actions to be consistent;
Invoking the action execution script by utilizing the automation script so that the server acquires the performance event identified by the first process;
The step of calling a system tracking script and a log acquisition script by using the automation script to obtain a first process identifier in a corresponding action process of an application program to be tested comprises the following steps: calling the system tracking script and the log acquisition script by using the automation script to obtain operation data in the corresponding action process of the application program to be tested so as to obtain a log file; acquiring the first process identifier of which the consumption of the central processing unit of the server is higher than a threshold value in the corresponding action process of the application program to be tested according to the log file;
The step of calling an action execution script by using the automation script and executing a corresponding action on the application program to be tested according to the action execution script comprises the following steps: judging whether the appointed transmission port of the server is occupied or not; if yes, releasing the appointed transmission port; and creating a second process identifier of the appointed transmission port through the subprocess module, and creating a socket on the appointed transmission port so as to carry out communication data transmission.
2. The method of collecting according to claim 1, wherein the step of calling an application configuration script using the automation script and downloading the application to be tested according to the application configuration script comprises:
Acquiring the file name of an installation package of the application to be tested according to the application configuration script;
setting a download configuration file of a browser, and initializing a browser instance with the download configuration file;
and acquiring the download address of the installation package from the download configuration file so as to install the application program to be tested.
3. The method of collecting as claimed in claim 1, wherein the step of invoking the action execution script using the automation script to cause the server to collect the performance event identified by the first process comprises:
And calling the action execution script by using the automation script, and setting configuration information on a session control interface of the action execution script, wherein the configuration information comprises: platform name, platform version, equipment name, automation name and installation package of the application program to be tested;
And the server acquires the performance event identified by the first process by utilizing the action execution script.
4. The collection method of claim 1, wherein,
The actions include at least one of cold start, sliding, switching, screen lighting and screen extinguishing; and/or the number of the groups of groups,
The log file includes central processing unit schedule, disk activity, and application threads.
5. An apparatus for collecting performance events during application execution, comprising:
The application preparation module is used for writing an automatic script in the server; calling an application program configuration script by using the automation script, and downloading an application program to be tested according to the application program configuration script;
The interaction action selection module is used for calling an action execution script by utilizing the automation script and executing corresponding actions on the application program to be tested according to the action execution script;
the process selection module is used for calling a system tracking script and a log acquisition script by using the automatic script so as to obtain a first process identifier in the corresponding action process of the application program to be tested; specifically, the automatic script is used for calling the system tracking script and the log acquisition script to obtain operation data in the corresponding action process of the application program to be tested so as to obtain a log file; acquiring the first process identifier of which the consumption of the central processing unit of the server is higher than a threshold value in the corresponding action process of the application program to be tested according to the log file;
the data acquisition module is used for calling the action execution script by utilizing the automation script so that the server side acquires the performance event identified by the first process;
The step of calling an action execution script by using the automation script and executing a corresponding action on the application program to be tested according to the action execution script comprises the following steps: judging whether the appointed transmission port of the server is occupied or not; if yes, releasing the appointed transmission port; creating a second process identifier of the appointed transmission port through a subprocess module, and creating a socket on the appointed transmission port so as to transmit communication data;
The step of calling the action execution script by using the automation script to enable the server to collect the performance event identified by the first process comprises the following steps: writing the login parameters of the corresponding actions into a configuration file, reading the configuration file and sending the configuration file to the nodes operated by the corresponding actions so as to enable the configuration parameters of the nodes operated by the corresponding actions to be consistent.
6. A computer device comprising a memory and a processor coupled to each other; the memory is used for storing a computer program; the processor is configured to execute the computer program to implement the collection method of any one of claims 1-4.
7. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for implementing the collecting method according to any one of claims 1-4.
CN202011437005.2A 2020-12-07 2020-12-07 Method and related device for collecting performance events during running of application program Active CN112559090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011437005.2A CN112559090B (en) 2020-12-07 2020-12-07 Method and related device for collecting performance events during running of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011437005.2A CN112559090B (en) 2020-12-07 2020-12-07 Method and related device for collecting performance events during running of application program

Publications (2)

Publication Number Publication Date
CN112559090A CN112559090A (en) 2021-03-26
CN112559090B true CN112559090B (en) 2024-04-19

Family

ID=75060435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011437005.2A Active CN112559090B (en) 2020-12-07 2020-12-07 Method and related device for collecting performance events during running of application program

Country Status (1)

Country Link
CN (1) CN112559090B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7685273B1 (en) * 2004-03-31 2010-03-23 Compuware Corporation Methods and apparatus for collecting and displaying performance metrics from a web site
CN108763042A (en) * 2018-05-24 2018-11-06 广东睿江云计算股份有限公司 A kind of Cloud Server performance data acquisition method and device based on python
CN109840209A (en) * 2019-01-18 2019-06-04 深圳壹账通智能科技有限公司 Application performance collecting method, terminal, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130151197A1 (en) * 2011-11-23 2013-06-13 General Electric Company Automated performance measurement processes and systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7685273B1 (en) * 2004-03-31 2010-03-23 Compuware Corporation Methods and apparatus for collecting and displaying performance metrics from a web site
CN108763042A (en) * 2018-05-24 2018-11-06 广东睿江云计算股份有限公司 A kind of Cloud Server performance data acquisition method and device based on python
CN109840209A (en) * 2019-01-18 2019-06-04 深圳壹账通智能科技有限公司 Application performance collecting method, terminal, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孔珏.GSM话务网管数据采集系统的设计与实现.《中国优秀硕士学位论文全文数据库 (信息科技辑)》.2005,(第08期),I136-276. *

Also Published As

Publication number Publication date
CN112559090A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
US9720799B1 (en) Validating applications using object level hierarchy analysis
CN107168841B (en) Remote testing method and device for mobile equipment
CN107506300B (en) User interface testing method, device, server and storage medium
CN103838663A (en) Application testing method and device
CN106648685B (en) Intelligent terminal system application processing method and device and intelligent terminal
CN110365724B (en) Task processing method and device and electronic equipment
US20130219226A1 (en) Distributed testing within a serial testing infrastructure
CN108614767A (en) A kind of remote debugging method and device
CN108959064B (en) Popup window processing method and device for automatic test
WO2014099828A1 (en) Test scope determination based on code change(s)
CN113672441B (en) Method and device for testing intelligent equipment
CN111651232A (en) One-machine multi-control method, device and system and electronic equipment
Li et al. Effectively manifesting concurrency bugs in android apps
CN110489698B (en) System and method for automatically collecting webpage data
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN113127329B (en) Script debugging method and device and computer storage medium
CN112559090B (en) Method and related device for collecting performance events during running of application program
CN116627850A (en) Function debugging method and device, storage medium and electronic equipment
CN115145797A (en) Application performance testing method, device, equipment and storage medium
US9730038B2 (en) Techniques to manage platform migrations
CN115454856A (en) Multi-application security detection method, device, medium and electronic equipment
CN115617668A (en) Compatibility testing method, device and equipment
CN115113890A (en) Automatic deployment method, system, equipment and medium of terminal software
CN107688479B (en) Android system network cluster, construction method thereof, and Android system network cluster data processing method and system
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium

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