CN110554949A - Cross-platform process data collecting and analyzing tool, method and using method - Google Patents

Cross-platform process data collecting and analyzing tool, method and using method Download PDF

Info

Publication number
CN110554949A
CN110554949A CN201910814218.3A CN201910814218A CN110554949A CN 110554949 A CN110554949 A CN 110554949A CN 201910814218 A CN201910814218 A CN 201910814218A CN 110554949 A CN110554949 A CN 110554949A
Authority
CN
China
Prior art keywords
performance data
data
operating system
collection
acquiring
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.)
Withdrawn
Application number
CN201910814218.3A
Other languages
Chinese (zh)
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.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910814218.3A priority Critical patent/CN110554949A/en
Publication of CN110554949A publication Critical patent/CN110554949A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3409Recording 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/3419Recording 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

the invention provides a cross-platform process data collecting and analyzing tool, a method and a using method, comprising the following steps: obtaining operating system information and judging the type of an operating system; acquiring a software process list according to the type of an operating system; acquiring process performance data, and storing the process performance data corresponding to the process list; the collected process performance data is analyzed and a line graph is generated. The method achieves the purpose of continuously recording software performance data for a long time by acquiring the list of the corresponding software process and storing the collected project data of the corresponding list in a local file, and the tool also provides an analysis function of the performance data, can select the corresponding performance data file and directly generate a corresponding line graph after analysis, thereby being capable of conveniently finding out the trend of the performance data and the problem of large resource occupation or sudden change of the resource occupation in the operation process. And the tool interface is simple and can be used conveniently.

Description

cross-platform process data collecting and analyzing tool, method and using method
Technical Field
the invention relates to the technical field of software testing, in particular to a cross-platform process data collecting and analyzing tool, a cross-platform process data collecting and analyzing method and a using method.
Background
in the usual software testing process, the performance test is an indispensable part, and whether the software has the problem that the memory overflow and the like possibly influence the system can be quickly analyzed by continuously observing the utilization rates of the CPU and the memory. There is currently no simple tool for recording or analyzing performance data for corresponding processes across platforms. In addition, during the software running process, it is possible to trigger performance data exception only at a certain time point, which results in that when observing the performance data, it must be continuous and can be recorded for a long time to find out whether there is a problem as much as possible.
Disclosure of Invention
There is currently no simple tool to record or analyze performance data for a process across platforms. In addition, during the software running process, it is possible to trigger performance data exception only at a certain time point, which results in that when observing the performance data, it must be continuous and can be recorded for a long time to find out whether there is a problem as much as possible. The invention provides a cross-platform process data collecting and analyzing tool, a cross-platform process data collecting and analyzing method and a using method.
in a first aspect, a technical solution of the present invention provides a cross-platform process data collection and analysis method, including the steps of:
Obtaining operating system information and judging the type of an operating system;
Acquiring a software process list according to the type of an operating system;
Acquiring process performance data, and storing the process performance data corresponding to the process list;
the collected process performance data is analyzed and a line graph is generated.
further, the specific step of obtaining the software process list according to the type of the operating system includes:
if the judgment result is that the system is a windows operating system, directly acquiring a process list;
If the Linux operating system is judged, acquiring the authority information of the Linux, connecting according to the acquired authority information, distributing a corresponding acquisition script to the Linux equipment after connection, and acquiring a Linux process list.
further, the step of obtaining the process performance data and storing the process performance data corresponding to the process list includes:
setting collection items, collection intervals and collection duration; the collection items comprise CPU utilization rate, physical memory utilization rate, virtual memory utilization rate and memory utilization rate.
further, before the step of obtaining the process performance data and storing the process performance data corresponding to the process list, the method includes:
Setting a storage position of the performance data;
and setting a storage position of the data to be analyzed.
Further, a process list is obtained and process performance data is obtained through psutil in python;
the collected process performance data is analyzed by matplotlib and a line graph is generated.
In a second aspect, the technical solution of the present invention provides a cross-platform process data collection and analysis tool, including an operating system type judgment module, a process list acquisition module, a data output storage module, and a data analysis module;
the operating system type judging module is used for acquiring operating system information and judging the type of an operating system;
The process list acquisition module is used for acquiring a software process list according to the type of the operating system;
The data acquisition module is used for acquiring process performance data;
The data output storage module is used for outputting and storing the process performance data of the corresponding process list;
And the data analysis module is used for analyzing the collected process performance data and generating a line graph.
further, the process list acquiring module is used for directly acquiring the process list if the operating system type judging module judges that the operating system is the windows operating system;
and the process list acquisition module is used for acquiring the permission information of the Linux and connecting according to the acquired permission information if the operating system type judgment module judges that the operating system is the Linux operating system, distributing the corresponding acquisition script to the Linux equipment after connection, and acquiring the Linux process list.
Furthermore, the tool also comprises a collection item setting module, wherein the collection item setting module is used for setting collection items, collection intervals and collection duration; the collection items comprise CPU utilization rate, physical memory utilization rate, virtual memory utilization rate and memory utilization rate.
Furthermore, the tool also comprises a position setting module, wherein the position setting module is used for setting the storage position of the performance data and the storage position of the data to be analyzed.
Through process list acquisition and process performance data collection, the collected data are analyzed and a line graph is generated after the data collection is completed, and the performance occupation condition of the process in the time period can be very conveniently known. And finally, a graphical interface of the function is realized through the Tkinter, and an executable program, namely a cross-platform process data collection analysis tool, is generated by packaging.
In a third aspect, the present invention provides a method for using a cross-platform process data collection and analysis tool, including the following steps:
if a software tool is opened and new performance data collection is started, selecting a corresponding software process;
selecting performance data to collect;
Inputting a collection interval and a collection duration;
and selecting a data saving path and starting to collect process performance data.
further, the method further comprises:
And opening a software tool, selecting a performance data storage path, analyzing the performance data and generating a line graph if the software tool does not collect new performance data.
according to the technical scheme, the invention has the following advantages: the method achieves the purpose of continuously recording software performance data for a long time by acquiring the list of the corresponding software process and storing the collected project data of the corresponding list in a local file, and the tool also provides an analysis function of the performance data, can select the corresponding performance data file and directly generate a corresponding line graph after analysis, thereby being capable of conveniently finding out the trend of the performance data and the problem of large resource occupation or sudden change of the resource occupation in the operation process. And the tool interface is simple and can be used conveniently.
in addition, the invention has reliable design principle, simple structure and very wide application prospect.
therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
in order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a cross-platform process data collection and analysis method provided by the invention.
FIG. 2 is a schematic block diagram of a cross-platform process data collection analysis tool according to an embodiment of the present invention.
fig. 3 is a flowchart illustrating a method for using a cross-platform process data collection and analysis tool according to an embodiment of the present invention.
FIG. 4 is a display interface for recording performance data collected through Windows process performance collection analysis according to an embodiment of the present invention.
FIG. 5 is a screenshot of an analysis interface for performance data.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
as shown in fig. 1, an embodiment of the present invention provides a cross-platform process data collection and analysis method, including the following steps:
S1: obtaining operating system information and judging the type of an operating system;
s2: acquiring a software process list according to the type of an operating system; if the judgment result is that the system is a windows operating system, directly acquiring a process list; if the Linux operating system is judged, acquiring the authority information of the Linux, connecting according to the acquired authority information, distributing a corresponding acquisition script to the Linux equipment after connection, and acquiring a Linux process list;
S3: setting collection items, collection intervals and collection duration; the collection items comprise CPU utilization rate, physical memory utilization rate, virtual memory utilization rate and memory utilization rate;
S4: setting a storage position of the performance data and a storage position of the data to be analyzed;
In the embodiment, a process list and process performance data are obtained through psutil in python;
S5: acquiring process performance data, and storing the process performance data of the corresponding process list;
S6: the collected process performance data is analyzed and a line graph is generated.
after the data collection is completed, the collected data is analyzed through the matplotlib to generate a line graph, and the performance occupation situation of the process in the time period can be very conveniently known.
the method achieves the purpose of continuously recording software performance data for a long time by acquiring the list corresponding to the software process and storing the CPU and the memory data of the corresponding list in a local file.
it should be noted that the permission information includes ip, user name, and password of linux, after connection, the software may distribute a corresponding acquisition script to the linux device and obtain a linux process list, the following steps are the same as those of windows, and after collection is completed, the performance data file may be downloaded from the linux device to the local computer.
example two
as shown in fig. 2, an embodiment of the present invention provides a cross-platform process data collection analysis tool, and psutil is a cross-platform library, and is mainly used for system monitoring, performance analysis, and process management. Matplotlib is a Python 2D drawing library that can generate published quality graphics in a variety of hardcopy formats and interactive environments on a variety of platforms. The tkinet is a standard GUI library of Python, and a user can quickly develop and create a graphical interface through the tkinet, compile a software interface according to the method provided in the first embodiment, and package software to generate EXE, that is, a cross-platform process data collection and analysis tool in this embodiment, where the tool includes an operating system type determination module for obtaining operating system information and determining the type of an operating system;
The process list acquisition module is used for acquiring a software process list according to the type of the operating system;
the data acquisition module is used for acquiring process performance data;
The data output storage module is used for outputting and storing the process performance data of the corresponding process list;
And the data analysis module is used for analyzing the collected process performance data and generating a line graph.
The process list acquisition module is used for directly acquiring the process list if the operating system type judgment module judges that the operating system is the windows operating system;
And the process list acquisition module is used for acquiring the permission information of the Linux and connecting according to the acquired permission information if the operating system type judgment module judges that the operating system is the Linux operating system, distributing the corresponding acquisition script to the Linux equipment after connection, and acquiring the Linux process list.
the tool also comprises a collection item setting module, wherein the collection item setting module is used for setting collection items, collection intervals and collection duration; the collection items comprise CPU utilization rate, physical memory utilization rate, virtual memory utilization rate and memory utilization rate.
the tool also comprises a position setting module, wherein the position setting module is used for setting the storage position of the performance data and the storage position of the data to be analyzed.
Through process list acquisition and process performance data collection, the collected data are analyzed and a line graph is generated after the data collection is completed, and the performance occupation condition of the process in the time period can be very conveniently known. And finally, a graphical interface of the function is realized through the Tkinter, and an executable program, namely a cross-platform process performance collection analysis tool, is generated by packaging.
The tool provides an analysis function of performance data, can select a corresponding performance data file, and directly generates a corresponding line graph after the tool is analyzed, so that the trend of the performance data can be conveniently seen, and the problem of large resource occupation or sudden change of the resource occupation can be solved in the running process. And the tool interface is simple and can be used conveniently.
EXAMPLE III
As shown in fig. 3 to 5, an embodiment of the present invention provides a method for using a cross-platform process data collection analysis tool, where functions of process list acquisition and process performance data collection are implemented by using psutuil in python, and after data collection is completed, collected data is analyzed by matplotlib to generate a line graph, so that performance occupation of the process in the time period can be very conveniently known. Finally, a graphical interface of the function is realized through the Tkinter, and the graphical interface is packaged to generate a tool provided by the executable program generation embodiment II, so that the subsequent use is facilitated. The use method of the tool comprises the following steps:
s11: opening a software tool;
S12: judging whether to start collecting new performance data, if so, executing step S13; if not, go to step S17;
S13: selecting a corresponding software process and executing the next step;
s14: selecting performance data to be collected, and executing the next step;
s15: inputting a collection interval and a collection duration, and executing the next step;
S16: selecting a data storage path and starting to collect process performance data; the data collection is completed, ending or performing step S17;
s17: and selecting a performance data storage path, analyzing the performance data and generating a line graph.
And reading the set collection items, using the psutil to acquire performance data in the acquired process list, and storing the performance data in a specified file. Performance data analysis: the saved performance data file is read by python, analysis is carried out, and then the analyzed data is output in a line graph through matplotlib as shown in fig. 5, so that the purpose of analyzing the data is achieved. Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a cross-platform process data collecting and analyzing tool is characterized by comprising an operating system type judging module, a process list acquiring module, a data output and storage module and a data analyzing module;
the operating system type judging module is used for acquiring operating system information and judging the type of an operating system;
the process list acquisition module is used for acquiring a software process list according to the type of the operating system;
The data acquisition module is used for acquiring process performance data;
The data output storage module is used for outputting and storing the process performance data of the corresponding process list;
and the data analysis module is used for analyzing the collected process performance data and generating a line graph.
2. the cross-platform process data collecting and analyzing tool of claim 1, wherein the process list obtaining module is configured to directly obtain the process list if the operating system type determining module determines that the operating system is a windows operating system;
And the process list acquisition module is used for acquiring the permission information of the Linux and connecting according to the acquired permission information if the operating system type judgment module judges that the operating system is the Linux operating system, distributing the corresponding acquisition script to the Linux equipment after connection, and acquiring the Linux process list.
3. The cross-platform process data collection and analysis tool of claim 1, further comprising a collection item setting module, wherein the collection item setting module is used for setting collection items, collection intervals and collection duration; the collection items comprise CPU utilization rate, physical memory utilization rate, virtual memory utilization rate and memory utilization rate.
The tool also comprises a position setting module, wherein the position setting module is used for setting the storage position of the performance data and the storage position of the data to be analyzed.
4. A cross-platform process data collection and analysis method is characterized by comprising the following steps:
Obtaining operating system information and judging the type of an operating system;
acquiring a software process list according to the type of an operating system;
Acquiring process performance data, and storing the process performance data corresponding to the process list;
the collected process performance data is analyzed and a line graph is generated.
5. The method for collecting and analyzing process data of cross-platform according to claim 4, wherein the specific step of obtaining the software process list according to the type of the operating system comprises:
if the judgment result is that the system is a windows operating system, directly acquiring a process list;
if the Linux operating system is judged, acquiring the authority information of the Linux, connecting according to the acquired authority information, distributing a corresponding acquisition script to the Linux equipment after connection, and acquiring a Linux process list.
6. the method of claim 4, wherein the step of obtaining process performance data and storing the process performance data corresponding to the process list comprises:
setting collection items, collection intervals and collection duration; the collection items comprise CPU utilization rate, physical memory utilization rate, virtual memory utilization rate and memory utilization rate.
7. The method of claim 6, wherein the step of obtaining process performance data and storing the process performance data corresponding to the process list comprises:
setting a storage position of the performance data;
And setting a storage position of the data to be analyzed.
8. the method of claim 7, wherein the process list and the process performance data are obtained through psutil in python;
The collected process performance data is analyzed by matplotlib and a line graph is generated.
9. a method for using a cross-platform process data collection and analysis tool is characterized by comprising the following steps:
If a software tool is opened and new performance data collection is started, selecting a corresponding software process;
Selecting performance data to collect;
Inputting a collection interval and a collection duration;
and selecting a data saving path and starting to collect process performance data.
10. the method of claim 8, further comprising:
and opening a software tool, selecting a performance data storage path, analyzing the performance data and generating a line graph if the software tool does not collect new performance data.
CN201910814218.3A 2019-08-30 2019-08-30 Cross-platform process data collecting and analyzing tool, method and using method Withdrawn CN110554949A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910814218.3A CN110554949A (en) 2019-08-30 2019-08-30 Cross-platform process data collecting and analyzing tool, method and using method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910814218.3A CN110554949A (en) 2019-08-30 2019-08-30 Cross-platform process data collecting and analyzing tool, method and using method

Publications (1)

Publication Number Publication Date
CN110554949A true CN110554949A (en) 2019-12-10

Family

ID=68738574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910814218.3A Withdrawn CN110554949A (en) 2019-08-30 2019-08-30 Cross-platform process data collecting and analyzing tool, method and using method

Country Status (1)

Country Link
CN (1) CN110554949A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124820A (en) * 2019-12-13 2020-05-08 郑州威科姆科技股份有限公司 Method for realizing off-line monitoring and analysis of operating system and process resources
CN112398915A (en) * 2020-10-28 2021-02-23 武汉大势智慧科技有限公司 APP application auditing method and system of cloud rendering platform

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124820A (en) * 2019-12-13 2020-05-08 郑州威科姆科技股份有限公司 Method for realizing off-line monitoring and analysis of operating system and process resources
CN111124820B (en) * 2019-12-13 2023-12-22 郑州威科姆科技股份有限公司 Method for realizing off-line monitoring and analysis of operating system and process resources
CN112398915A (en) * 2020-10-28 2021-02-23 武汉大势智慧科技有限公司 APP application auditing method and system of cloud rendering platform
CN112398915B (en) * 2020-10-28 2022-07-01 武汉大势智慧科技有限公司 APP application auditing method and system of cloud rendering platform

Similar Documents

Publication Publication Date Title
CN107193750B (en) Script recording method and device
CN110362483B (en) Performance data acquisition method, device, equipment and storage medium
US9904517B2 (en) System and method for automatic modeling of an application
US10360140B2 (en) Production sampling for determining code coverage
CN110795357B (en) Program monitoring method and device
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
US10528456B2 (en) Determining idle testing periods
CN110196801B (en) Code coverage rate based test method and device
CN110554949A (en) Cross-platform process data collecting and analyzing tool, method and using method
Schuler et al. Examining the energy impact of sorting algorithms on android: an empirical study
CN111367768A (en) Method and device for monitoring function response time of program
CN111400171B (en) Interface testing method, system and device and readable storage medium
CN110597704A (en) Application program pressure testing method, device, server and medium
CN112162908A (en) Program call link monitoring implementation method and device based on bytecode injection technology
CN111597111A (en) Application program starting speed monitoring method and device
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN116303078A (en) Application program code level performance analysis method, device, equipment and medium
CN107342917B (en) Method and apparatus for detecting network device performance
CN111666201A (en) Regression testing method, device, medium and electronic equipment
KR102386330B1 (en) Apparutus and method for analyzing user process based on standard process
CN112346981A (en) Joint debugging test coverage rate detection method and system
CN112181816A (en) Interface testing method and device based on scene, computer equipment and medium
CN111240990A (en) ISMCLI command line testing method, system, terminal and storage medium
Falai et al. Quantitative evaluation of distributed algorithms using the neko framework: The nekostat extension
US20200125735A1 (en) Non-intrusive method of detecting security flaws of a computer program

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20191210