CN111061610B - Generation method and device of cluster system performance test report and computer equipment - Google Patents

Generation method and device of cluster system performance test report and computer equipment Download PDF

Info

Publication number
CN111061610B
CN111061610B CN201911253024.7A CN201911253024A CN111061610B CN 111061610 B CN111061610 B CN 111061610B CN 201911253024 A CN201911253024 A CN 201911253024A CN 111061610 B CN111061610 B CN 111061610B
Authority
CN
China
Prior art keywords
server
generating
performance test
performance
log file
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
CN201911253024.7A
Other languages
Chinese (zh)
Other versions
CN111061610A (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.)
Guangzhou Dingjia Computer Technology Co ltd
Original Assignee
Guangzhou Dingjia Computer 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 Guangzhou Dingjia Computer Technology Co ltd filed Critical Guangzhou Dingjia Computer Technology Co ltd
Priority to CN201911253024.7A priority Critical patent/CN111061610B/en
Publication of CN111061610A publication Critical patent/CN111061610A/en
Application granted granted Critical
Publication of CN111061610B publication Critical patent/CN111061610B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a method and a device for generating a cluster system performance test report and computer equipment. The method comprises the following steps: sending a performance test instruction to each server in a server cluster to be subjected to performance test; the performance test instruction is used for indicating a server in the server cluster to collect performance data and generating a log file based on the performance data; receiving the log file sent by the server in the server cluster; and extracting target performance data from the log file, and generating a performance test report according to the target performance data. By the embodiment of the invention, the complexity of the performance test framework can be reduced, and the generation efficiency of the performance test report of the cluster system can be improved.

Description

Generation method and device of cluster system performance test report and computer equipment
Technical Field
The present application relates to the field of performance testing technologies, and in particular, to a method and an apparatus for generating a performance test report of a cluster system, and a computer device.
Background
The performance test is an important link in the software system, can verify whether the software system reaches the performance index provided by the user, and simultaneously finds out the performance bottleneck existing in the software system, thereby optimizing the software system.
At present, each server in a server cluster generally collects performance data, stores the performance data in a database, and then a tester inquires related performance data from the database and writes a performance test report.
Because the performance data needs to be stored in the database, the testing framework needs to deploy the database in advance, and the performance testing report is completed manually, so that the efficiency is low, and errors are easy to occur.
Disclosure of Invention
Therefore, in order to solve the above technical problems, a method, an apparatus, and a computer device for generating a performance test report of a cluster system are provided, which can improve the efficiency of generating the performance test report without deploying a database.
In a first aspect, an embodiment of the present invention provides a method for generating a performance test report of a cluster system, where the method is applied to a report generation server, and the method includes:
sending a performance test instruction to each server in a server cluster to be subjected to performance test; the performance test instruction is used for indicating the servers in the server cluster to collect performance data and generating a log file based on the performance data;
receiving a log file sent by a server in a server cluster;
and extracting target performance data from the log file, and generating a performance test report according to the target performance data.
In one embodiment, the generating a performance test report according to the target performance data includes:
generating a test image according to the target performance data, wherein the test image is used for representing the corresponding relation between the target performance data and the acquisition time;
and generating a performance test report according to the test image.
In one embodiment, the extracting the target performance data from the log file includes:
screening target log files in a target acquisition time period from the plurality of log files;
target performance data is extracted from the target log file.
In one embodiment, before the screening out the target log files within the target collection time period from the plurality of log files, the method further includes:
and receiving a target acquisition time period set by a user.
In one embodiment, after generating the test image from the target performance data, the method further comprises:
and storing the test image into a preset file.
In one embodiment, before sending the performance test instruction to each server in the server cluster to be subjected to the performance test, the method further includes:
receiving at least one performance test index set by a user; the performance test index comprises at least one of the utilization rate of a central processing unit, the utilization rate of a memory and the number of times of reading and writing operations of a magnetic disk per second;
and generating a performance test instruction according to at least one performance test index.
In one embodiment, the report generation server is one server in a server cluster.
In a second aspect, an embodiment of the present invention provides a method for generating a performance test report of a cluster system, where the method is applied to each server in a server cluster, and the method includes:
receiving a performance test instruction sent by a report generation server;
acquiring performance data according to the performance test instruction;
and generating a log file according to the collected performance data, and sending the log file to a report generating server so that the report generating server can generate a performance test report according to the log file.
In one embodiment, the collecting performance data according to the performance test instruction includes:
when the server is determined to be in a pressure test state, collecting performance data;
the server in the stress test state comprises the following steps: the utilization rate of a central processing unit of the server reaches a preset utilization rate, and the occupancy rate of the network bandwidth of the server reaches at least one of the preset occupancy rates.
In a third aspect, an embodiment of the present invention provides a device for generating a performance test report of a cluster system, where the device is deployed in a report generation server, and the device includes:
the performance test instruction sending module is used for sending a performance test instruction to each server in the server cluster to be subjected to the performance test; the performance test instruction is used for indicating the servers in the server cluster to collect performance data and generating a log file based on the performance data;
the log file receiving module is used for receiving log files sent by the servers in the server cluster;
and the performance test report generating module is used for extracting target performance data from the log file and generating a performance test report according to the target performance data.
In one embodiment, the performance test report generating module is specifically configured to generate a test image according to the target performance data, where the test image is used to represent a corresponding relationship between the target performance data and the acquisition time; and generating a performance test report according to the test image.
In one embodiment, the performance test report generating module is specifically configured to screen out a target log file within a target acquisition time period from a plurality of log files; target performance data is extracted from the target log file.
In one embodiment, the apparatus further comprises:
and the target acquisition time period receiving module is used for receiving a target acquisition time period set by a user.
In one embodiment, the apparatus further comprises:
and the test image storage module is used for storing the test image into a preset file.
In one embodiment, the apparatus further comprises:
the performance test index receiving module is used for receiving at least one performance test index set by a user; the performance test index comprises at least one of the utilization rate of a central processing unit, the utilization rate of a memory and the number of times of reading and writing operations of a magnetic disk per second;
and the performance test instruction generating module is used for generating a performance test instruction according to at least one performance test index.
In one embodiment, the report generation server is one server in a server cluster.
In a fourth aspect, an embodiment of the present invention provides an apparatus for generating a performance test report of a cluster system, where the apparatus is deployed in each server in a server cluster, and the apparatus includes:
the performance test instruction receiving module is used for receiving a performance test instruction sent by the report generating server;
the performance data acquisition module is used for acquiring performance data according to the performance test instruction;
and the log file generation module is used for generating a log file according to the collected performance data and sending the log file to the report generation server so that the report generation server can generate a performance test report according to the log file.
In one embodiment, the performance data acquisition module is specifically configured to acquire the performance data when it is determined that the server is in a stress test state; the server in the stress test state comprises the following steps: the utilization rate of a central processing unit of the server reaches a preset utilization rate, and the occupancy rate of the network bandwidth of the server reaches at least one of the preset occupancy rates.
In a fifth aspect, an embodiment of the present invention provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps in the method when executing the computer program.
In a sixth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the method as described above.
According to the cluster system performance test report generation method, the cluster system performance test report generation device and the computer equipment, the report generation server sends a performance test instruction to each server in the server cluster to be subjected to the performance test; receiving a log file sent by a server in a server cluster; and extracting target performance data from the log file, and generating a performance test report according to the target performance data. According to the embodiment of the invention, the report generation server can extract the target performance data according to the log file sent by the server in the server cluster to generate the performance test report, so that not only is the performance data stored without deploying a database and the complexity of a performance test framework reduced, but also the performance test report is automatically generated, the generation efficiency of the performance test report of the cluster system is improved, and the error rate is reduced.
Drawings
FIG. 1 is a diagram of an application environment in which a method for generating a performance test report for a cluster system according to an embodiment is implemented;
FIG. 2 is a flowchart illustrating a method for generating a performance test report of a cluster system according to an embodiment;
FIG. 3 is a flowchart illustrating a method for generating a performance test report of a cluster system according to another embodiment;
FIG. 4 is a flowchart illustrating a method for generating a performance test report of a cluster system according to another embodiment;
FIG. 5 is a block diagram illustrating an exemplary apparatus for generating a performance test report of a cluster system;
FIG. 6 is a block diagram illustrating an exemplary apparatus for generating a performance test report of a cluster system;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The generation method of the cluster system performance test report provided by the application can be applied to the application environment shown in fig. 1. The application environment includes a server cluster and a report generating server 101, where the server cluster includes a plurality of servers 102, and the report generating server 101 may be one server in the server cluster or one server outside the server cluster. Moreover, each server may be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, a method for generating a performance test report of a cluster system is provided, which is described by taking the application of the method to a report generating server in fig. 1 as an example, and includes the following steps:
step 201, sending a performance test instruction to each server in a server cluster to be subjected to performance test; the performance test instruction is used for instructing the servers in the server cluster to collect performance data and generating a log file based on the performance data.
In this embodiment, the report generation server sends a performance test instruction to each server in the server cluster, and the servers in the server cluster receive the performance test instruction and acquire performance data according to the performance test instruction.
For example, a collector is arranged on each server in the server cluster, and after the server receives the performance test instruction, the collector is started to collect the utilization rate of the central processing unit, the utilization rate of the memory, the number of times of read-write operations per second performed by the disk, and the like of the server. The embodiment of the invention does not limit the collected performance data in detail and can be set according to the actual situation.
After collecting the performance data, the servers in the server cluster generate log files according to the performance data, wherein the log files are unstructured data.
Step 202, receiving a log file sent by a server in the server cluster.
In this embodiment, after a server in a server cluster generates a log file, the log file is sent to a report generation server, and the report generation server receives the log file sent by each server.
Each server in the server cluster may send the log file to the report generating server at preset time intervals. For example, a log file is sent every 8 hours, or 20:00 sends a log file. The preset time interval is not limited in detail in the embodiment of the invention, and can be set according to actual conditions.
Step 203, extracting target performance data from the log file, and generating a performance test report according to the target performance data.
In this embodiment, the report generation server may be installed with a report generation application program, and after receiving the log file sent by each server, extract the target performance data from the log file. For example, the processor utilization of each server is extracted from the log file; or extracting the memory utilization rate of each server from the log file; and the times of reading and writing operations of the disk of each server per second can be extracted from the log file.
And after the target performance data is extracted, automatically generating a performance test report according to the target performance data. For example, a performance test report of the utilization rate of the processor is generated according to the utilization rate of the central processing unit of each server; or generating a performance test report of the memory utilization rate according to the memory utilization rate of each server; and generating a performance test report according to the utilization rate of the central processing unit and the memory of each server and the number of times of reading and writing operations of the disk per second. The performance test report is not limited in detail in the embodiment of the invention, and can be set according to actual conditions.
In the method for generating the cluster system performance test report, a performance test instruction is sent to each server in a server cluster to be subjected to performance test; receiving a log file sent by a server in a server cluster; and extracting target performance data from the log file, and generating a performance test report according to the target performance data. According to the embodiment of the invention, the report generation server can extract the target performance data according to the log file sent by the server in the server cluster to generate the performance test report, so that not only is the performance data stored without deploying a database and the complexity of a performance test framework reduced, but also the performance test report is automatically generated, the generation efficiency of the performance test report of the cluster system is improved, and the error rate is reduced.
In another embodiment, as shown in fig. 3, this embodiment relates to an optional process of the method for generating a performance test report of a cluster system. On the basis of the embodiment shown in fig. 2, the method may specifically include the following steps:
step 301, receiving at least one performance test index set by a user.
In this embodiment, the user may set the performance test index in the report generation server. For example, a report generation application is installed on the report generation server, and the report generation application is used to receive the performance test indexes input by the user. The performance test index comprises at least one of the utilization rate of a central processing unit, the utilization rate of a memory and the number of times of reading and writing operations of a magnetic disk per second. The performance test indexes are not limited in detail in the embodiment of the invention, and can be set according to actual conditions.
Step 302, generating a performance test instruction according to at least one performance test index.
In this embodiment, after the user sets the performance test index, the report generation server generates the performance test instruction according to the performance test index. For example, the generated performance test instruction carries the utilization rate of the central processing unit, the utilization rate of the memory, the number of times of performing read-write operations per second by the disk, and the like.
Step 303, sending a performance test instruction to each server in the server cluster to be subjected to the performance test; the performance test instruction is used for instructing the servers in the server cluster to collect performance data and generating a log file based on the performance data.
Step 304, receiving the log file sent by the server in the server cluster.
Step 305, receiving a target collection time period set by a user.
In this embodiment, the report generation server may receive the target collection time period input by the user through the report generation application program. In this way, performance test reports may be generated only for log files within the target acquisition time period.
Step 306, screening out target log files in the target collection time period from the plurality of log files.
In this embodiment, the report generation server receives the log file sent by the server in the server cluster, and stores the log file. And after receiving a target acquisition time period set by a user, screening a target log file from the plurality of log files according to the target acquisition time period.
For example, if the target collection time period is 8:00-20:00 on 1 month and 1 day, target log files between 8:00-20:00 can be screened from a plurality of log files on 1 month and 1 day.
And if the target log file is not found in the target acquisition time period, not generating a performance test report.
Step 307, extracting target performance data from the target log file.
In this embodiment, after the target log file is obtained, the target performance data is extracted from the target log file. For example, the processor utilization of each server is extracted from the target log file; or extracting the memory utilization rate of each server from the target log file; and the times of reading and writing operations of the disk per second can be extracted from the target log file. The target performance data is not limited in detail in the embodiment of the invention, and can be set according to actual conditions.
And 308, generating a test image according to the target performance data, wherein the test image is used for representing the corresponding relation between the target performance data and the acquisition time.
In this embodiment, after the target performance data is extracted, the test image is generated according to the acquisition time of the target performance data. For example, the test image is a two-dimensional line graph, the X-axis is the acquisition time, and the Y-axis is the utilization rate of the central processing unit; or the X axis is the acquisition time, and the Y axis is the memory utilization rate; the X axis can be the acquisition time, and the Y axis can be the times of reading and writing operations of the magnetic disk per second. The embodiment of the invention does not limit the test image in detail, and can be set according to the actual situation.
Step 309, storing the test image in a preset file.
In this embodiment, a file for storing the test image is preset, and after the test image is generated, the test image is stored in the preset file.
Step 310, generating a performance test report according to the test image.
In this embodiment, after the test image is generated, a performance test report may be directly generated according to the test image; or acquiring a test image from a preset file to generate a performance test report. The performance test report may include a two-dimensional line graph of the utilization rate of the central processing unit, a two-dimensional line graph of the utilization rate of the memory, a two-dimensional line graph of the utilization rate of the central processing unit, and a two-dimensional line graph of the number of times of reading and writing operations per second performed by the disk. The performance test report is not limited in detail in the embodiment of the invention, and can be set according to actual conditions.
In the method for generating the cluster system performance test report, the report generating server generates a performance test instruction according to a performance test index set by a user, and sends the performance test instruction to each server in the server cluster; then, the report generation server receives the log files sent by the servers in the server cluster, and screens out target log files from the plurality of log files according to a target acquisition time period set by a user, so as to extract target performance data from the target log files; and finally, generating a test image according to the target performance data, and generating a performance test report according to the test image. According to the embodiment of the invention, the performance test report can be generated according to the performance test index set by the user and the target acquisition time period, so that the actual requirements of the user are better met; in addition, the complexity of a test framework can be reduced without deploying a database, and the generation efficiency of the cluster system performance test report can be improved and the error rate can be reduced by automatically generating the report.
In an embodiment, as shown in fig. 4, a method for generating a performance test report of a cluster system is provided, which is described by taking the method as an example applied to each server in the server cluster in fig. 1, and includes the following steps:
step 401, receiving a performance test instruction sent by a report generating server.
In this embodiment, a user may set a performance test index to be tested in a report generation server, and the report generation server generates a performance test instruction according to the performance test index; the report generating server then sends performance test instructions to each server in the cluster of servers.
Each server in the server cluster receives a performance test instruction sent by the report generation server, wherein the performance test instruction comprises a performance test index. The performance test index comprises at least one of the utilization rate of the central processing unit, the utilization rate of the memory and the number of times of reading and writing operations of the disk per second. The performance test indexes are not limited in detail in the embodiment of the invention, and can be set according to actual conditions.
And 402, acquiring performance data according to the performance test instruction.
In this embodiment, after each server in the server cluster receives the performance test instruction sent by the report generation server, performance data is collected according to the performance test instruction. Specifically, a collector may be arranged on each server in the server cluster, and after receiving the performance test instruction, the collector is started to collect performance data corresponding to the performance test index. For example, the utilization rate of a central processing unit, the utilization rate of a memory, the number of times of reading and writing operations per second of a disk, and the like are adopted.
In one embodiment, performance data is collected when the server is determined to be in a stress test state. Specifically, after a collector is started, each server in a server cluster firstly judges whether the server is in a pressure test state, and if the server is in the pressure test state, performance data are collected; if not, performance data is not collected.
Wherein, the server is in the stress test state and includes: the utilization rate of a central processing unit of the server reaches a preset utilization rate, and the occupancy rate of the network bandwidth of the server reaches at least one of the preset occupancy rates. For example, the preset utilization rate is 60%, and if the utilization rate of a central processing unit of the server is lower than 60%, the server is judged not to be in a pressure test state, and performance data are not collected; and if the utilization rate of the central processing unit of the server reaches 60%, judging that the server is in a pressure test state, and collecting performance data. Or, the preset occupancy rate is 70%, and if the occupancy rate of the network bandwidth of the server is lower than 70%, the server is judged not to be in a pressure test state, and performance data are not collected; and if the occupancy rate of the network bandwidth of the server reaches 70%, judging that the server is in a pressure test state, and collecting performance data. The embodiment of the invention does not limit the preset utilization rate and the preset occupancy rate in detail, and can be set according to actual conditions.
Step 403, generating a log file according to the collected performance data, and sending the log file to a report generation server, so that the report generation server generates a performance test report according to the log file.
In this embodiment, after each server in the server cluster acquires the performance data, a log file is generated according to the acquired performance data. For example, a first log file is generated from the performance data collected on day 1/month 1, and a second log file is generated from the performance data collected on day 1/month 2. The embodiment of the present invention does not specifically limit the way of generating the log file, and can be set according to the actual situation.
After the log file is generated, the log file may be transmitted to the report generating server at a preset time interval. For example, a log file is sent every 8 hours, or 20:00 sends a log file. The preset time interval is not limited in detail in the embodiment of the invention, and can be set according to actual conditions.
After receiving the log files, the report generation server screens out target log files of a target acquisition time period from the plurality of log files; extracting target performance data from the target log file; and finally, generating a test image according to the target performance data, and generating a performance test report according to the test image.
In one embodiment, after each server in the server cluster generates the log file, the log file may be stored locally in the server, and then the locally stored log file is sent to the log server at a fixed time, and the log server stores the log file. And finally, when the report generating server generates a performance test report, acquiring a target log file from the log server according to the target acquisition time period.
In the method for generating the cluster system performance test report, each server in the server cluster receives a performance test instruction sent by the report generating server; acquiring performance data according to the performance test instruction; and generating a log file according to the collected performance data, and sending the log file to a report generating server so that the report generating server can generate a performance test report according to the log file. According to the embodiment of the invention, the server in the server cluster generates the log file, and the log file is unstructured data and does not need to be stored by a database, so that the complexity of a performance test framework can be reduced.
It should be understood that although the various steps in the flowcharts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, an apparatus for generating a performance test report of a cluster system, which is deployed in a report generation server, is provided, and includes:
a performance test instruction sending module 501, configured to send a performance test instruction to each server in a server cluster to be subjected to a performance test; the performance test instruction is used for indicating the servers in the server cluster to collect performance data and generating a log file based on the performance data;
a log file receiving module 502, configured to receive a log file sent by a server in a server cluster;
the performance test report generating module 503 is configured to extract target performance data from the log file, and generate a performance test report according to the target performance data.
In one embodiment, the performance test report generating module 503 is specifically configured to generate a test image according to the target performance data, where the test image is used to represent a corresponding relationship between the target performance data and the acquisition time; and generating a performance test report according to the test image.
In one embodiment, the performance test report generating module 503 is specifically configured to screen out a target log file within a target acquisition time period from a plurality of log files; target performance data is extracted from the target log file.
In one embodiment, the apparatus further comprises:
and the target acquisition time period receiving module is used for receiving a target acquisition time period set by a user.
In one embodiment, the apparatus further comprises:
and the test image storage module is used for storing the test image into a preset file.
In one embodiment, the apparatus further comprises:
the performance test index receiving module is used for receiving at least one performance test index set by a user; the performance test index comprises at least one of the utilization rate of a central processing unit, the utilization rate of a memory and the number of times of reading and writing operations of a magnetic disk per second;
and the performance test instruction generating module is used for generating a performance test instruction according to at least one performance test index.
In one embodiment, the report generation server is one server in a server cluster.
In an embodiment, as shown in fig. 6, an embodiment of the present invention provides an apparatus for generating a performance test report of a cluster system, where the apparatus is deployed in each server in a server cluster, and the apparatus includes:
a performance test instruction receiving module 601, configured to receive a performance test instruction sent by the report generating server;
a performance data acquisition module 602, configured to acquire performance data according to the performance test instruction;
the log file generating module 603 is configured to generate a log file according to the collected performance data, and send the log file to the report generating server, so that the report generating server generates a performance test report according to the log file.
In one embodiment, the performance data collecting module 602 is specifically configured to collect the performance data when it is determined that the server is in the stress test state; the server in the stress test state comprises the following steps: the utilization rate of a central processing unit of the server reaches a preset utilization rate, and the occupancy rate of the network bandwidth of the server reaches at least one of the preset occupancy rates.
For specific limitations of the generating device of the cluster system performance test report, reference may be made to the above limitations of the generating method of the cluster system performance test report, which are not described herein again. All or part of the modules in the device for generating the cluster system performance test report can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store performance data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for generating a cluster system performance test report.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
sending a performance test instruction to each server in a server cluster to be subjected to performance test; the performance test instruction is used for indicating the servers in the server cluster to collect performance data and generating a log file based on the performance data;
receiving a log file sent by a server in a server cluster;
and extracting target performance data from the log file, and generating a performance test report according to the target performance data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
generating a test image according to the target performance data, wherein the test image is used for representing the corresponding relation between the target performance data and the acquisition time;
and generating a performance test report according to the test image.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
screening target log files in a target acquisition time period from the plurality of log files;
target performance data is extracted from the target log file.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and receiving a target acquisition time period set by a user.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and storing the test image into a preset file.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving at least one performance test index set by a user; the performance test index comprises at least one of the utilization rate of a central processing unit, the utilization rate of a memory and the number of times of reading and writing operations of a magnetic disk per second;
and generating a performance test instruction according to at least one performance test index.
In one embodiment, the report generating server is one server in a server cluster.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
sending a performance test instruction to each server in a server cluster to be subjected to performance test; the performance test instruction is used for indicating the servers in the server cluster to collect performance data and generating a log file based on the performance data;
receiving a log file sent by a server in a server cluster;
and extracting target performance data from the log file, and generating a performance test report according to the target performance data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
generating a test image according to the target performance data, wherein the test image is used for representing the corresponding relation between the target performance data and the acquisition time;
and generating a performance test report according to the test image.
In one embodiment, the computer program when executed by the processor further performs the steps of:
screening target log files in a target acquisition time period from the plurality of log files;
target performance data is extracted from the target log file.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and receiving a target acquisition time period set by a user.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and storing the test image into a preset file.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving at least one performance test index set by a user; the performance test index comprises at least one of the utilization rate of a central processing unit, the utilization rate of a memory and the number of times of reading and writing operations of a magnetic disk per second;
and generating a performance test instruction according to at least one performance test index.
In one embodiment, the report generating server is one server in a server cluster.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A generation method of a cluster system performance test report is applied to a report generation server, and comprises the following steps:
sending a performance test instruction to each server in a server cluster to be subjected to performance test; the performance test instruction is used for indicating a server in the server cluster to collect performance data and generating a log file based on the performance data; the log file is unstructured data;
receiving the log file sent by the server in the server cluster;
extracting target performance data from the log file, and generating a performance test report according to the target performance data;
wherein generating a performance test report based on the target performance data comprises:
generating a test image according to the target performance data, wherein the test image is used for representing the corresponding relation between the target performance data and the acquisition time;
and generating the performance test report according to the test image.
2. The method of claim 1, wherein extracting target performance data from the log file comprises:
screening out target log files in a target acquisition time period from the plurality of log files;
and extracting the target performance data from the target log file.
3. The method of claim 2, wherein prior to said screening out a target log file from a plurality of said log files for a target acquisition time period, said method further comprises:
and receiving the target acquisition time period set by a user.
4. The method of any of claims 1 to 3, wherein the report generating server is one of the servers in the cluster of servers.
5. A method for generating a performance test report of a cluster system, applied to each server in a server cluster, the method comprising:
receiving a performance test instruction sent by a report generation server;
acquiring performance data according to the performance test instruction;
generating a log file according to the collected performance data, sending the log file to the report generating server so that the report generating server extracts target performance data from the log file, generating a test image according to the target performance data, and generating the performance test report according to the test image; the log file is unstructured data; the test image is used for representing the corresponding relation between the target performance data and the acquisition time.
6. The method of claim 5, wherein collecting performance data according to the performance test instructions comprises:
when the server is determined to be in a pressure test state, acquiring the performance data;
the server being in a stress test state comprises: the utilization rate of a central processing unit of the server reaches a preset utilization rate, and the occupancy rate of the network bandwidth of the server reaches at least one of the preset occupancy rates.
7. An apparatus for generating a performance test report of a cluster system, the apparatus being deployed in a report generation server, the apparatus comprising:
the performance test instruction sending module is used for sending a performance test instruction to each server in the server cluster to be subjected to the performance test; the performance test instruction is used for indicating a server in the server cluster to collect performance data and generating a log file based on the performance data; the log file is unstructured data;
a log file receiving module, configured to receive the log file sent by a server in the server cluster;
the performance test report generation module is used for extracting target performance data from the log file and generating a performance test report according to the target performance data;
the performance test report generation module is specifically used for generating a test image according to the target performance data, and the test image is used for representing the corresponding relation between the target performance data and the acquisition time; and generating a performance test report according to the test image.
8. An apparatus for generating a performance test report of a cluster system, the apparatus being deployed in each server of a server cluster, the apparatus comprising:
the performance test instruction receiving module is used for receiving a performance test instruction sent by the report generating server;
the performance data acquisition module is used for acquiring performance data according to the performance test instruction;
the log file sending module is used for generating a log file according to the collected performance data, sending the log file to the report generating server so that the report generating server extracts target performance data from the log file, generates a test image according to the target performance data, and generates the performance test report according to the test image; the log file is unstructured data; the test image is used for representing the corresponding relation between the target performance data and the acquisition time.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN201911253024.7A 2019-12-09 2019-12-09 Generation method and device of cluster system performance test report and computer equipment Active CN111061610B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911253024.7A CN111061610B (en) 2019-12-09 2019-12-09 Generation method and device of cluster system performance test report and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911253024.7A CN111061610B (en) 2019-12-09 2019-12-09 Generation method and device of cluster system performance test report and computer equipment

Publications (2)

Publication Number Publication Date
CN111061610A CN111061610A (en) 2020-04-24
CN111061610B true CN111061610B (en) 2020-10-20

Family

ID=70300412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911253024.7A Active CN111061610B (en) 2019-12-09 2019-12-09 Generation method and device of cluster system performance test report and computer equipment

Country Status (1)

Country Link
CN (1) CN111061610B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115005B (en) * 2020-08-11 2022-11-29 苏宁云计算有限公司 Test data acquisition method and device, computer equipment and storage medium
CN112732576B (en) * 2021-01-08 2024-06-04 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8418000B1 (en) * 2012-03-13 2013-04-09 True Metrics LLC System and methods for automated testing of functionally complex systems
CN104461823A (en) * 2014-12-03 2015-03-25 浪潮集团有限公司 Method for automatically recovering unexpected downtime node in cluster
CN105468490A (en) * 2015-12-11 2016-04-06 珠海金山网络游戏科技有限公司 Server performance automatic test method and system and device
CN106844171A (en) * 2016-12-27 2017-06-13 浪潮软件集团有限公司 Mass operation and maintenance implementation method
CN106850321A (en) * 2017-04-05 2017-06-13 无锡华云数据技术服务有限公司 A kind of simulated testing system of cluster server
CN109167676A (en) * 2018-07-24 2019-01-08 郑州云海信息技术有限公司 A kind of diagnostic method and system of High-Performance Computing Cluster failure
CN109995612A (en) * 2019-03-21 2019-07-09 北京奇艺世纪科技有限公司 A kind of service method for inspecting, device and electronic equipment
CN110442500A (en) * 2019-07-19 2019-11-12 苏州浪潮智能科技有限公司 A kind of test method and device of the super fusion clustering performance based on Unixbench

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9405812B2 (en) * 2012-10-22 2016-08-02 Platfora, Inc. Systems and methods for providing performance metadata in interest-driven business intelligence systems
US20160098663A1 (en) * 2014-10-06 2016-04-07 Avaya Inc. Agent quality and performance monitoring based on non-primary skill evaluation
CN106227877A (en) * 2016-08-02 2016-12-14 北京集奥聚合科技有限公司 A kind of distributed information log acquisition system based on hadoop and method
CN107911252A (en) * 2017-12-14 2018-04-13 郑州云海信息技术有限公司 A kind of unstructured distributed memory system method for analyzing performance, system and equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8418000B1 (en) * 2012-03-13 2013-04-09 True Metrics LLC System and methods for automated testing of functionally complex systems
CN104461823A (en) * 2014-12-03 2015-03-25 浪潮集团有限公司 Method for automatically recovering unexpected downtime node in cluster
CN105468490A (en) * 2015-12-11 2016-04-06 珠海金山网络游戏科技有限公司 Server performance automatic test method and system and device
CN106844171A (en) * 2016-12-27 2017-06-13 浪潮软件集团有限公司 Mass operation and maintenance implementation method
CN106850321A (en) * 2017-04-05 2017-06-13 无锡华云数据技术服务有限公司 A kind of simulated testing system of cluster server
CN109167676A (en) * 2018-07-24 2019-01-08 郑州云海信息技术有限公司 A kind of diagnostic method and system of High-Performance Computing Cluster failure
CN109995612A (en) * 2019-03-21 2019-07-09 北京奇艺世纪科技有限公司 A kind of service method for inspecting, device and electronic equipment
CN110442500A (en) * 2019-07-19 2019-11-12 苏州浪潮智能科技有限公司 A kind of test method and device of the super fusion clustering performance based on Unixbench

Also Published As

Publication number Publication date
CN111061610A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
CN111147322B (en) Test system and method for micro service architecture of 5G core network
CN111143163B (en) Data monitoring method, device, computer equipment and storage medium
CN108491321B (en) Method and device for determining test case range and storage medium
CN111061610B (en) Generation method and device of cluster system performance test report and computer equipment
CN112115005B (en) Test data acquisition method and device, computer equipment and storage medium
CN110704312B (en) Method, device, computer equipment and storage medium for pressure test
CN110502224B (en) Interface simulation method and device based on HTTP request and computer equipment
CN108241580B (en) Client program testing method and terminal
CN111459796B (en) Automated testing method, apparatus, computer device and storage medium
CN110532021B (en) Processing method of configuration file of distributed control system, client and service device
CN113176995B (en) Interface testing method, device, equipment and medium based on testing scene
US11928033B2 (en) Incident-responsive, computing system snapshot generation
CN114168429A (en) Error reporting analysis method and device, computer equipment and storage medium
CN110618819A (en) Method and device for automatically deploying WINPE system in batches and computer equipment
CN114138634B (en) Test case selection method and device, computer equipment and storage medium
CN114385485A (en) Interface test method, device, equipment and storage medium
CN109582516B (en) SSD back-end performance analysis method and device, computer equipment and storage medium
CN112486824B (en) Case code generation method, device, computer equipment and storage medium
CN115017027A (en) Interface automation continuous integration test method, device, equipment and storage medium
CN110704218B (en) Data processing method, data processing device, computer equipment and storage medium
CN112527584A (en) Software efficiency improving method and system based on script compiling and data acquisition
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN112395057A (en) Data processing method and device based on timing task and computer equipment
CN111897540A (en) Data collection method and device based on private cloud, server and storage medium
CN114661513B (en) Distributed multi-source data acquisition method, system, 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