WO2020164263A1 - Librgw performance test method and apparatus, and computer device - Google Patents

Librgw performance test method and apparatus, and computer device Download PDF

Info

Publication number
WO2020164263A1
WO2020164263A1 PCT/CN2019/116336 CN2019116336W WO2020164263A1 WO 2020164263 A1 WO2020164263 A1 WO 2020164263A1 CN 2019116336 W CN2019116336 W CN 2019116336W WO 2020164263 A1 WO2020164263 A1 WO 2020164263A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
file
threads
librgw
read
Prior art date
Application number
PCT/CN2019/116336
Other languages
French (fr)
Chinese (zh)
Inventor
曹斌
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020164263A1 publication Critical patent/WO2020164263A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2294Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by remote test
    • 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

Definitions

  • This application relates to the technical field of performance testing, in particular to a method, device and computer equipment for performance testing of librgw.
  • Ceph is a unified, distributed file system designed for excellent performance, reliability and scalability. It provides three types of storage: block storage, file storage, and object storage. Among them, object storage (cloud storage) is an object-oriented/file-oriented, massive Internet storage.
  • object storage cloud storage
  • ceph provides object storage services for Internet cloud service providers through rgw (Rados Gateway). The client first needs to request rgw via http, and then access Ceph via rgw. And our company has developed a new way to access Ceph.
  • Librgw is set in the client. When data needs to be read, the client needs to call librgw through a JAVA program to directly access the ceph cluster, thereby reading the data in the ceph cluster .
  • librgw is an application. Since librgw is a new access method to ceph, there is currently no performance test method for librgw, and developers cannot understand the relevant performance data of librgw when reading and writing data in ceph.
  • the main purpose of this application is to provide a librgw performance test method, device and computer equipment, aiming to solve the drawbacks of the prior art that there is no test method for librgw performance.
  • this application provides a performance test method of librgw, which is used for multiple reading and writing tests of test files, and the method includes:
  • test instruction includes a test file size and test parameters
  • librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record each time the librgw performs the test file Reading and writing test data generated during the process of reading and writing, and respectively acquiring the read and write status of each time the librgw reads and writes the test file;
  • test data and the read/write status are output to the display interface as test information.
  • This application also provides a performance test device of librgw, which is used for reading and writing test files for multiple times, and the test device includes:
  • the read-write module calls librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record every time the librgw performs the test
  • the output module is used to output each of the test data and the read/write status as test information to the display interface.
  • the present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of the above methods when the computer program is executed by the processor.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.
  • the performance test method, device and computer equipment of librgw provided in this application, according to the test file size and test parameters input by the user, read and write the corresponding test file from the preset server through librgw, thereby testing that librgw performs the test file Read and write all test information, and output all test information graphically, so that developers can quickly get the relevant data of librgw in the process of reading and writing data, and complete the performance test for librgw.
  • FIG. 1 is a schematic diagram of the steps of a performance test method of librgw in an embodiment of the present application
  • FIG. 2 is a block diagram of the overall structure of the performance testing device of librgw in an embodiment of the present application
  • FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the present application.
  • an embodiment of the present application provides a performance test method of librgw, which is used for multiple read and write tests of test files, and the method includes:
  • S1 Receive a test instruction, where the test instruction includes a test file size and test parameters;
  • S3 Output each of the test data and the read/write status as test information to the display interface.
  • the client after the client creates the data, it needs to upload the data to the ceph cluster, that is, the preset server for storage.
  • the client is provided with librgw.
  • the client When data needs to be read, the client needs to call librgw to access the ceph cluster through a JAVA program, thereby reading the data in the ceph cluster and writing the read data to the client's hard disk.
  • librgw is the access application.
  • the client When the client is doing librgw performance testing, it needs to take corresponding actions according to the test instructions entered by the user.
  • the test instruction entered by the user includes the size of the test file and test parameters; the size of the test file is the storage size of the test file, such as 4KB, 1MB, etc.; the test parameters include the specified number of threads, test time or test request volume , The designated number of threads is the total number of threads that simultaneously initiate calls to librgw during the read and write process, the test time is the total time of the entire read and write process, and the test request volume is the total number of read and write requests during the entire read and write process.
  • the client After the client receives the test instruction input by the user, it calls librgw through a pre-built JAVA program, and filters the test file corresponding to the size of the test file according to the prefix of the file name of the test file. Among them, when the test file is generated, the file name will carry a file prefix consistent with the file size of the test file. For example, if the file size of test file A is 4KB, the file name of test file A is 4KB_test file A.
  • Librgw initiates a number of threads that call librgw at the same time, reads the test files from the preset server, and writes the test files to the client's hard disk, until the entire read and write time reaches the test time. .
  • test time and test request amount can only be selected during the test process, and cannot be selected at the same time; one read request is one request amount, and one write request is one request amount, so one read and write request is two requests amount . For example, if the number of test requests is 80, there are a total of 40 read requests and 40 write requests in this test.
  • the client calculates the MD5 value of the test file read by librgw from the preset server according to the MD5 algorithm, obtains the read MD5 value, and obtains the upload MD5 value of the test file from the preset server.
  • the uploaded MD5 value is the MD5 value calculated after the test file is generated, and the test file is uploaded to the preset server for storage together with the test file.
  • the client compares the read MD5 value of the test file with the uploaded MD5 value to determine whether the two are the same. If they are not the same, it is determined that the test file read and write errors, and the current read and write status of the test file through librgw is recorded as a read and write error.
  • test data includes request time, response time, and file name.
  • test parameters include a designated number of threads, a test time, and/or a test request amount
  • the designated number of threads is the total number of threads that call librgw simultaneously initiated during the read and write process
  • the test time is the entire read and write process
  • the total time of the test request is the total number of read and write requests in the entire read and write process
  • the call librgw reads the test file corresponding to the test file size from the preset server according to the test parameters
  • test parameter includes the test request amount and/or the test time
  • test request amount and the test time are included, select one parameter from the test request amount and the test time as the current test parameter; or, if the test request amount or the test time is included Test time, the included test request amount or the test time is used as the current test parameter;
  • test condition is the specified number of threads and the test time
  • test condition is the specified number of threads and the test time
  • librgw a number of separate threads for calling librgw corresponding to the specified number of threads
  • the test file corresponding to the test file size is repeatedly read from the preset server, And write the test file into the storage space; or, when the test condition is the specified number of threads and the amount of test requests, simultaneously initiate a number of separate calls for librgw corresponding to the specified number of threads Thread, repeat the action of reading the test file corresponding to the size of the test file from the preset server and writing the test file into the storage space for a number corresponding to the test request amount, where all The test file carries a file prefix corresponding to the size of the test file.
  • a smart test function is provided inside the client, and the user can independently choose whether to turn on the smart test function.
  • the client receives the test instruction input by the user, it needs to first check whether the smart test function is currently enabled. If the client does not currently enable the smart test function, it needs to parse out all the parameter types in the current test parameters, and filter the parameter types in the test parameters. The client first judges whether the test parameter includes the test request amount. If the test request amount is included, the test request amount is selected as the parameter that needs to be used for this read and write test. No matter whether the test parameter has a test time or not, it will not use. If the test request volume is not included, it is necessary to determine whether the test parameter includes the test time.
  • test time is not included, the test parameters of this read-write test are incomplete, the test cannot be performed, and this test fails. If the test time is included, select the test time to be a parameter that needs to be used for this read and write test, and further determine whether the test parameter includes the specified number of threads. Among them, the screening steps of test request amount and test time are in no particular order, but in a read and write test, only one test request amount or test time can be used, and cannot be selected at the same time.
  • librgw filters out the test files corresponding to the size of the test file according to the file prefix of the file name of the test file. For example, in the test parameters, the test time is 10 minutes, the specified number of threads is 80, and the test file size is 4KB, then 80 threads that call librgw will be initiated at the same time, and 40 read requests and 40 write requests will be sent concurrently.
  • the read rate is 4KB_ The test file at the beginning of the file prefix.
  • librgw will automatically read the test files beginning with any prefix. For example, if the test instruction specifies the test time as 10 minutes, the number of threads is 80, and the test file size is not specified, the client will initiate 80 threads that call librgw at the same time, and concurrently send 40 read requests and 40 write requests.
  • the preset server reads test files beginning with any number prefix, that is, mixed reading and writing tests of files of any size.
  • step of judging whether the smart test function has been turned on it includes:
  • S207 Simultaneously initiate a number of separate threads for calling librgw corresponding to the first preset number of threads, and read the test file corresponding to the test file size from the preset server within the preset unit time , And write the test file into the storage space to obtain a reference response time, where the reference response time is an average response time for librgw to read and write the test file within the preset unit time;
  • a second preset number of threads is calculated according to the first preset rule and the first preset number of threads, so as to complete the action of calculating the second preset number of threads, where the second preset number of threads is The total number of threads that call librgw initiated simultaneously during the reading and writing process during the second smart test;
  • S209 Simultaneously initiate a number of separate threads for calling librgw corresponding to the second preset number of threads, and read the test file corresponding to the size of the test file from the preset server within the preset unit time , And write the test file into the storage space to obtain the secondary response time to complete the action of reading and writing the test file;
  • S2010 Determine whether the secondary response time is greater than the reference response time of a preset multiple, so as to complete the action of determining the response time;
  • the client detects that the user has activated the smart test function, it will automatically call the first preset number of threads and the preset unit time.
  • the first preset number of threads and the preset unit time can be set by the user to set specific values.
  • the client simultaneously initiates the first preset thread several calls to librgw to read the test file corresponding to the size of the test file from the preset server, and write the test file to the client's hard disk, to get librgw to read and write the test within the preset unit time
  • the average response time of the file which is the baseline response time.
  • the second preset number of threads is calculated according to the first preset rule and the first preset number of threads, so as to complete the action of calculating the second preset number of threads.
  • the average response time that is, the second response time, to complete the action of reading and writing test files.
  • the first preset rule is specifically: setting the number of incrementing threads, and taking the sum of the number of incrementing threads and the number of first preset threads as the second preset number of threads; or setting the number of increments, setting the number of increments and the first preset Let the product of the number of threads be the second preset number of threads.
  • the client compares the second response time with the reference response time of a preset multiple, and judges the magnitude relationship between the two to complete the action of judging the response time. If the secondary response time is greater than the reference time of the preset multiple, it is determined that this reading and writing test is over.
  • the actions of calculating the second preset number of threads, reading and writing test files, and judging the response time are executed cyclically, until the current response time is greater than the reference multiple of the preset Response time.
  • the current second preset thread number is used as the next first preset thread number.
  • the method includes:
  • S2013 Simultaneously initiate a number of threads for invoking librgw corresponding to the number of system threads, repeatedly read the test file corresponding to the size of the test file from the preset server within the test time, and combine the The test file is written to the storage space.
  • the client when the client judges whether the test parameter includes the specified number of threads, if the test parameter does not include the specified number of threads, the client will automatically call the number of system threads preset by the user in order for the read and write test to proceed smoothly. Then, a number of system threads are initiated at the same time to call librgw, read the test file corresponding to the test file size from the preset server, and write the test file to the client's hard disk until the entire read and write time reaches the test time. stop. Further, if the client cannot detect the preset number of system threads, it will automatically output a reminder message to remind the user to enter the number of threads for this read and write test in time, so that the read and write test can proceed smoothly.
  • the reminder information includes at least one thread number customized by the system for the user to choose, and after the user selects it, the read and write test is directly performed according to the selected thread number.
  • the step of separately acquiring the read and write status of each time the librgw reads and writes the test file includes:
  • S2014 Calculate the read MD5 value of the test file read and written by the librgw respectively, and obtain the uploaded MD5 value of the test file pre-stored in the preset service terminal;
  • S2015 Determine whether the read MD5 value is the same as the uploaded MD5 value
  • MD5 is a general data verification method.
  • a character string that is, the MD5 value
  • the MD5 value is generated, such as ajk280aidjfoiquporwej. If the data in the file changes, even if one character is changed, the MD5 value generated is not the same. Therefore, it is a reliable way to verify the downloaded file and the uploaded file based on the MD5 value.
  • the client When the client generates the test file, it will generate the corresponding MD5 value, and when uploading the test file to the preset server, the MD5 value will be stored in the preset server along with the test file.
  • the client calculates the MD5 value of the test file read by librgw from the preset server according to the MD5 algorithm, and obtains the read MD5 value. Then get the uploaded MD5 value of the test file from the preset server. Among them, the uploaded MD5 value is the MD5 value calculated after the test file is generated, and the test file is uploaded to the preset server for storage together with the test file.
  • the client compares the read MD5 value of the test file with the uploaded MD5 value to determine whether the two are the same. If they are not the same, it is determined that the test file read and write errors, and the current read and write status of the test file through librgw is recorded as a read and write error. If they are the same, it is determined that the test file is read and written correctly, and the current read and write status of the test file through librgw is recorded as read and write correct.
  • test information is composed of a plurality of groups of the test data and the read and write status, and each group of the test data and the read and write status is grouped with one read and write request, and the test data is divided into groups.
  • step of outputting the read and write status as test information to the display interface includes:
  • the test information obtained by the client after completing the read and write test is composed of multiple sets of test data and read and write status, and each read and write request is a set of data.
  • the client uses the different parameter types and read and write status in each read and write request as the horizontal axis, and the test result in each read and write request as the vertical axis, and graphs each group of data to generate each read and write The requested bar chart.
  • the graphed groups of test data are output to the client's display page, so that users/testers can intuitively compare the differences between the test data of each read and write test based on the bar graph of each group of data.
  • step of receiving the test instruction it includes:
  • S4 Acquire a new file instruction input by the user, where the new file instruction includes a specified file size and file type, and the file type is text, picture or audio;
  • S5 Generate a random file according to the new file instruction, and note the file prefix corresponding to the specified file size in the file name of the random file, where the random file is a file composed of random data;
  • the new file instruction includes specifying the file size and file type, and the file type is text, picture or audio.
  • the client According to the new file instruction, the client generates a random file corresponding to the specified file size and file type.
  • the specific generation steps are: when the file type is text, if the text is a random sequence text, the client will create the number 0-9, uppercase and lowercase letters of aZ, and "*", "& Interface (Document Interface) Specify the type of file and write random sequence text into it at the same time to generate a random text file of the specified file size.
  • the client uses the jpg format and the configuration of the three primary colors RGB to randomly generate a set of points Color mark, such as (0,0,100,90,80), this point describes, the color of the point at (0,0) is (100,90,80), so fill the whole picture repeatedly, you get A picture with all random colors, because the size of the drawing board can be specified, so the size is also controllable.
  • the file type is audio, because in computer analysis, the audio is a set of numbers, such as 123456 for do, ro, mi Etc., so the client can randomly generate a set of digital sequences, combine them, and output them into a binary file according to the format of Mp3, then you can get a random audio file of the specified file size.
  • the client can remark in the file name of the random file with Specify a prefix with the same file size, and upload the random file after the remarks as a test file to the preset server, which completes the process of creating a new file.
  • Preset delimiters such as " and " ⁇ ", a total of 93 characters, each Generate a set of random sequences at a time, for example, generate 0123abc for the first time... and generate iu8kh122 for the second time. In this way, it is spliced into a completely disordered string and generated as a random sequence text with a specified file size. The text generated in this way is completely disordered, and each file is different. If this article is a word and excel format file, use the Document published by Microsoft
  • the performance test method of librgw provided in this embodiment, according to the test file size and test parameters input by the user, reads and writes the corresponding test file from the preset server through librgw, thereby testing all the tests that librgw reads and writes to the test file Information and output all test information graphically, so that developers can quickly get the relevant data of librgw in the process of reading and writing data, and complete the performance test for librgw.
  • an embodiment of the present application also provides a librgw performance test device, which is used for multiple reading and writing tests of test files, and the test device includes:
  • the receiving module 1 is configured to receive a test instruction, where the test instruction includes a test file size and test parameters;
  • Read and write module 2 call librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record each librgw pair The test data generated during the reading and writing of the test file, and the read and write status of each reading and writing of the test file by the librgw;
  • the output module 3 is used to output each of the test data and the read/write status as test information to the display interface.
  • the performance test device for librgw provided in this embodiment, according to the size of the test file and test parameters input by the user, reads and writes the corresponding test file from the preset server through librgw, thereby testing all the tests that librgw reads and writes to the test file Information and output all test information graphically, so that developers can quickly get the relevant data of librgw in the process of reading and writing data, and complete the performance test for librgw.
  • an embodiment of the present application also provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in FIG. 3.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer equipment is used to store test files and other data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • An embodiment of the present application further provides a computer-readable storage medium.
  • the readable storage medium may be a volatile readable storage medium or a non-volatile readable storage medium on which computer-readable instructions are stored.
  • the processes of the above-mentioned method embodiments are executed.
  • the above are only the preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of this application description and drawings, or directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of this application.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present application provides a librgw performance test method and apparatus, a computer device, and a computer-readable storage medium, relating to the technical field of performance tests. The method comprises: receiving a test instruction; calling librgw according to a test parameter to separately read, from a pre-configured server, a test file corresponding to a test file size, then writing the test file to a storage space, and recording test data and a read and write status; and outputting, to a display interface, the test data and the read and write status as test information. In the present application, a corresponding test file is read from or written to a pre-configured server by means of librgw and according to a test file size and a test parameter entered by a user, such that all test information related to librgw reading and writing the test file is acquired, and all of the test information is graphically output. Therefore, a developer can quickly acquire relevant data related to the data reading and writing process of librgw, and thereby complete a performance test on librgw.

Description

librgw的性能测试方法、装置和计算机设备Librgw performance testing method, device and computer equipment
本申请要求于2019年2月11日提交中国专利局、申请号为201910110284.2,发明名称为“librgw的性能测试方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on February 11, 2019, the application number is 201910110284.2, and the invention title is "librgw performance test method, device and computer equipment", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及性能测试技术领域,特别涉及一种librgw的性能测试方法、装置和计算机设备。This application relates to the technical field of performance testing, in particular to a method, device and computer equipment for performance testing of librgw.
背景技术Background technique
Ceph是一种为优秀的性能、可靠性和可扩展性而设计的统一的、分布式文件系统,它提供了三种存储类型:块存储、文件存储和对象储存。其中,对象存储(云存储)是面向对象/文件的、海量的互联网存储,现有技术中ceph通过rgw(Rados Gateway)为互联网云服务提供商提供对象存储服务。客户端首先需要通过http请求rgw,再通过rgw访问Ceph。而我司开发了一种新的访问Ceph方式,在客户端中设置有librgw,在需要读取数据时,客户端需要通过JAVA程序来调用librgw直接访问ceph集群,从而读取ceph集群中的数据。其中,librgw为一个应用程序。由于librgw是一种对ceph的新访问方式,目前并没有针对librgw的性能测试方法,开发人员无法了解librgw在对ceph中的数据进行读写时的相关性能数据。Ceph is a unified, distributed file system designed for excellent performance, reliability and scalability. It provides three types of storage: block storage, file storage, and object storage. Among them, object storage (cloud storage) is an object-oriented/file-oriented, massive Internet storage. In the prior art, ceph provides object storage services for Internet cloud service providers through rgw (Rados Gateway). The client first needs to request rgw via http, and then access Ceph via rgw. And our company has developed a new way to access Ceph. Librgw is set in the client. When data needs to be read, the client needs to call librgw through a JAVA program to directly access the ceph cluster, thereby reading the data in the ceph cluster . Among them, librgw is an application. Since librgw is a new access method to ceph, there is currently no performance test method for librgw, and developers cannot understand the relevant performance data of librgw when reading and writing data in ceph.
技术问题technical problem
本申请的主要目的为提供一种librgw的性能测试方法、装置和计算机设备,旨在解决现有技术中没有针对librgw性能的测试方法的弊端。The main purpose of this application is to provide a librgw performance test method, device and computer equipment, aiming to solve the drawbacks of the prior art that there is no test method for librgw performance.
技术解决方案Technical solutions
为实现上述目的,本申请提供了一种librgw的性能测试方法,用于多次对测试文件的读取和写入测试,所述方法包括:In order to achieve the above objective, this application provides a performance test method of librgw, which is used for multiple reading and writing tests of test files, and the method includes:
接收测试指令,其中,所述测试指令包括测试文件大小和测试参数;Receiving a test instruction, where the test instruction includes a test file size and test parameters;
调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,并记录每一次所述librgw对所述测试文件的读取和写入过程中产生的测试数据,以及分别获取每一次所述librgw读取和写入所述测试文件的读写状态;Call librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record each time the librgw performs the test file Reading and writing test data generated during the process of reading and writing, and respectively acquiring the read and write status of each time the librgw reads and writes the test file;
将各所述测试数据和所述读写状态作为测试信息输出到显示界面。Each of the test data and the read/write status are output to the display interface as test information.
本申请还提供了一种librgw的性能测试装置,用于多次对测试文件的读取和写入测试,所述测试装置包括:This application also provides a performance test device of librgw, which is used for reading and writing test files for multiple times, and the test device includes:
接收模块,用于接收测试指令,其中,所述测试指令包括测试文件大小和测试参数;A receiving module for receiving a test instruction, where the test instruction includes a test file size and test parameters;
读写模块,调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,并记录每一次所述librgw对所述测试文件的读取和写入过程中产生的测试数据,以及分别获取每一次所述librgw读取和写入所述测试文件的读写状态;The read-write module calls librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record every time the librgw performs the test The test data generated during the reading and writing of the test file, and the read and write status of each reading and writing of the test file by the librgw;
输出模块,用于将各所述测试数据和所述读写状态作为测试信息输出到显示界面。The output module is used to output each of the test data and the read/write status as test information to the display interface.
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序时实现上述任一项所述方法的步骤。The present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of the above methods when the computer program is executed by the processor.
本申请还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项所述的方法的步骤。The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.
有益效果Beneficial effect
本申请中提供的一种librgw的性能测试方法、装置和计算机设备,根据用户输入的测试文件大小和测试参数,通过librgw从预设服务器读写对应的测试文件,从而测试出librgw对测试文件进行读写的所有测试信息,并将所有测试信息图形化后输出,从而使得开发人员可以快速得到librgw在读写数据过程中的相关数据,完成针对librgw的性能测试。The performance test method, device and computer equipment of librgw provided in this application, according to the test file size and test parameters input by the user, read and write the corresponding test file from the preset server through librgw, thereby testing that librgw performs the test file Read and write all test information, and output all test information graphically, so that developers can quickly get the relevant data of librgw in the process of reading and writing data, and complete the performance test for librgw.
附图说明Description of the drawings
图1是本申请一实施例中librgw的性能测试方法步骤示意图;FIG. 1 is a schematic diagram of the steps of a performance test method of librgw in an embodiment of the present application;
图2是本申请一实施例中librgw的性能测试装置整体结构框图;FIG. 2 is a block diagram of the overall structure of the performance testing device of librgw in an embodiment of the present application;
图3是本申请一实施例的计算机设备的结构示意框图。FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的最佳实施方式The best mode of the invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, and not used to limit the application.
参照图1,本申请一实施例中提供了一种librgw的性能测试方法,用于多次对测试文件的读取和写入测试,所述方法包括:1, an embodiment of the present application provides a performance test method of librgw, which is used for multiple read and write tests of test files, and the method includes:
S1:接收测试指令,其中,所述测试指令包括测试文件大小和测试参数;S1: Receive a test instruction, where the test instruction includes a test file size and test parameters;
S2:调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,并记录每一次所述librgw对所述测试文件的读取和写入过程中产生的测试数据,以及分别获取每一次所述librgw读取和写入所述测试文件的读写状态;S2: Invoke librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record every time the librgw performs the test The test data generated during file reading and writing, and the read and write status of each time the librgw reads and writes the test file;
S3:将各所述测试数据和所述读写状态作为测试信息输出到显示界面。S3: Output each of the test data and the read/write status as test information to the display interface.
本实施例中,客户端在创建数据后,需要将数据上传到ceph集群,即预设服务器中进行存储。客户端中设置有librgw,在需要读取数据时,客户端需要通过JAVA程序来调用librgw访问ceph集群,从而读取ceph集群中的数据,并将读取的数据写入客户端的硬盘中。其中,librgw为访问应用程序。客户端在做librgw的性能测试时,需要根据用户输入的测试指令进行相应的动作。其中,用户输入的测试指令中包括测试文件大小以及测试参数;测试文件大小为用于测试文件的存储占量大小,比如4KB、1MB等等;测试参数包括指定线程数、测试时间或测试请求量,指定线程数为读写过程中同时发起调用librgw的线程的总数量,测试时间为整个读写过程的总时间,测试请求量为整个读写过程中读写请求的总次数。客户端在接收到用户输入的测试指令后,通过预先构造的JAVA程序调用librgw,根据测试文件的文件名的前缀,筛选到与测试文件大小对应的测试文件。其中,测试文件在生成时,会在文件名中携带有与测试文件的文件大小一致的文件前缀。比如,测试文件A的文件大小为4KB,则测试文件A的文件名为4KB_测试文件A。Librgw在筛选到测试文件后,同时发起指定线程数个调用librgw的线程,从预设服务器中读取测试文件,并将测试文件写入客户端的硬盘中,直至整个读写用时达到测试时间则停止。或者,同时发起指定线程数个调用librgw的线程,从预设服务器中读取测试文件,并将测试文件写入客户端的硬盘中,直至整个读写请求的总数量达到测试请求量则停止。其中,测试时间和测试请求量在测试过程中只能任选其一进行,不能同时选中;一个读请求为一个请求量,一个写请求为一个请求量,因此一个读写请求为两个请求量。比如,测试请求量为80个,则在本次测试中总共有40个读请求和40个写请求。在librgw完成一个读写测试后,客户端根据MD5的算法计算librgw从预设服务器读取的测试文件的MD5值,得到读取MD5值,并从预设服务端获取测试文件的上传MD5值。其中,上传MD5值为测试文件生成后计算得到的MD5值,与将测试文件一起上传到预设服务器进行存储。客户端将测试文件的读取MD5值与上传MD5值进行比对,判断两者是否相同。若不相同,则判定测试文件读写错误,并记录当前次通过librgw读写测试文件的读写状态为读写错误。若相同,则判定测试文件读写正确,并记录当前次通过librgw读写测试文件的读写状态为读写正确。客户端将每一次librgw对测试文件的读取和写入过程中产生的测试数据和读写状态作为测试信息输出到客户端的显示界面。其中,测试数据包括请求时间,响应时间,文件名。In this embodiment, after the client creates the data, it needs to upload the data to the ceph cluster, that is, the preset server for storage. The client is provided with librgw. When data needs to be read, the client needs to call librgw to access the ceph cluster through a JAVA program, thereby reading the data in the ceph cluster and writing the read data to the client's hard disk. Among them, librgw is the access application. When the client is doing librgw performance testing, it needs to take corresponding actions according to the test instructions entered by the user. Among them, the test instruction entered by the user includes the size of the test file and test parameters; the size of the test file is the storage size of the test file, such as 4KB, 1MB, etc.; the test parameters include the specified number of threads, test time or test request volume , The designated number of threads is the total number of threads that simultaneously initiate calls to librgw during the read and write process, the test time is the total time of the entire read and write process, and the test request volume is the total number of read and write requests during the entire read and write process. After the client receives the test instruction input by the user, it calls librgw through a pre-built JAVA program, and filters the test file corresponding to the size of the test file according to the prefix of the file name of the test file. Among them, when the test file is generated, the file name will carry a file prefix consistent with the file size of the test file. For example, if the file size of test file A is 4KB, the file name of test file A is 4KB_test file A. After selecting the test files, Librgw initiates a number of threads that call librgw at the same time, reads the test files from the preset server, and writes the test files to the client's hard disk, until the entire read and write time reaches the test time. . Or, initiate a designated number of threads to call librgw at the same time, read the test file from the preset server, and write the test file to the client's hard disk, until the total number of read and write requests reaches the test request amount. Among them, the test time and test request amount can only be selected during the test process, and cannot be selected at the same time; one read request is one request amount, and one write request is one request amount, so one read and write request is two requests amount . For example, if the number of test requests is 80, there are a total of 40 read requests and 40 write requests in this test. After librgw completes a read and write test, the client calculates the MD5 value of the test file read by librgw from the preset server according to the MD5 algorithm, obtains the read MD5 value, and obtains the upload MD5 value of the test file from the preset server. Among them, the uploaded MD5 value is the MD5 value calculated after the test file is generated, and the test file is uploaded to the preset server for storage together with the test file. The client compares the read MD5 value of the test file with the uploaded MD5 value to determine whether the two are the same. If they are not the same, it is determined that the test file read and write errors, and the current read and write status of the test file through librgw is recorded as a read and write error. If they are the same, it is determined that the test file is read and written correctly, and the current read and write status of the test file through librgw is recorded as read and write correct. The client terminal outputs the test data and read-write status generated during each reading and writing of the test file by librgw as test information to the client's display interface. Among them, the test data includes request time, response time, and file name.
进一步的,所述测试参数包括指定线程数、测试时间和/或测试请求量,所述指定线程数为读写过程中同时发起的调用librgw的线程总数量,所述测试时间为整个读写过程的总时间,所述测试请求量为整个读写过程中读写请求的总次数,所述调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间的步骤,包括:Further, the test parameters include a designated number of threads, a test time, and/or a test request amount, the designated number of threads is the total number of threads that call librgw simultaneously initiated during the read and write process, and the test time is the entire read and write process The total time of the test request is the total number of read and write requests in the entire read and write process, and the call librgw reads the test file corresponding to the test file size from the preset server according to the test parameters, And the step of writing the test file into the storage space includes:
S201:判断是否已经开启智能测试功能;S201: Determine whether the smart test function has been turned on;
S202:若没有开启智能测试功能,则判断所述测试参数中是否包含所述测试请求量和/或所述测试时间;S202: If the smart test function is not enabled, determine whether the test parameter includes the test request amount and/or the test time;
S203:若包含所述测试请求量和所述测试时间,则从所述测试请求量和所述测试时间中择一选择一个参数作为当前测试参数;或者,若包含所述测试请求量或所述测试时间,则将包含的所述测试请求量或所述测试时间作为所述当前测试参数;S203: If the test request amount and the test time are included, select one parameter from the test request amount and the test time as the current test parameter; or, if the test request amount or the test time is included Test time, the included test request amount or the test time is used as the current test parameter;
S204:判断所述测试参数中是否包含所述指定线程数;S204: Determine whether the test parameter includes the designated thread number;
S205:若包含所述指定线程数,则将所述指定线程数和所述当前测试参数组合在一起作为测试条件进行测试,其中,当所述测试条件为所述指定线程数和所述测试时间的时候,在所述测试时间内,同时发起与所述指定线程数对应数量的用于调用librgw的单独线程,重复从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间;或者,当所述测试条件为所述指定线程数和所述测试请求量时,同时发起与所述指定线程对应数量的用于调用librgw的单独线程,重复与所述测试请求量对应数量的从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间的动作,其中,所述测试文件携带有与所述测试文件大小对应的文件前缀。S205: If the specified number of threads is included, combine the specified number of threads and the current test parameter as a test condition for testing, wherein, when the test condition is the specified number of threads and the test time When, during the test time, a number of separate threads for calling librgw corresponding to the specified number of threads are simultaneously initiated, and the test file corresponding to the test file size is repeatedly read from the preset server, And write the test file into the storage space; or, when the test condition is the specified number of threads and the amount of test requests, simultaneously initiate a number of separate calls for librgw corresponding to the specified number of threads Thread, repeat the action of reading the test file corresponding to the size of the test file from the preset server and writing the test file into the storage space for a number corresponding to the test request amount, where all The test file carries a file prefix corresponding to the size of the test file.
本实施例中,客户端内部设置有智能测试功能,该智能测试功能由用户自主选择是否开启。在客户端接收到用户输入的测试指令后,需要先检测当前是否已经开启智能测试功能。若客户端当前没有开启智能测试功能,则需要解析出当前的测试参数中的所有参数类型,并对测试参数中的参数类型进行筛选。客户端首先判断测试参数中是否包含有测试请求量,若包含有测试请求量,则选定测试请求量为本次读写测试需要使用的参数,不管测试参数中是否具有测试时间,都不再采用。若不包含有测试请求量,则需要判断测试参数中是否包含有测试时间。若不包含有测试时间,则本次读写测试的测试参数不完整,无法进行测试,本次测试失败。如果包含有测试时间,则选定测试时间为本次读写测试需要使用的参数,并进一步判断测试参数中是否包含有指定线程数。其中,测试请求量和测试时间的筛选步骤不分先后顺序,只是在一次读写测试中,测试请求量或测试时间只能使用一个,不能同时选中。如果包含有指定线程数,则同时发起指定线程数个调用librgw的线程,从预设服务器中读取与测试文件大小对应的测试文件,并将该测试文件写入客户端的硬盘中,直至整个读写用时达到测试时间则停止。其中,librgw根据测试文件的文件名的文件前缀,筛选到与测试文件大小对应的测试文件。比如,测试参数中测试时间为10分钟,指定线程数为80,测试文件大小为4KB,那么会同时发起80个调用librgw的线程,并发40个读请求和40个写请求,读取以4KB_文件前缀开头的测试文件。In this embodiment, a smart test function is provided inside the client, and the user can independently choose whether to turn on the smart test function. After the client receives the test instruction input by the user, it needs to first check whether the smart test function is currently enabled. If the client does not currently enable the smart test function, it needs to parse out all the parameter types in the current test parameters, and filter the parameter types in the test parameters. The client first judges whether the test parameter includes the test request amount. If the test request amount is included, the test request amount is selected as the parameter that needs to be used for this read and write test. No matter whether the test parameter has a test time or not, it will not use. If the test request volume is not included, it is necessary to determine whether the test parameter includes the test time. If the test time is not included, the test parameters of this read-write test are incomplete, the test cannot be performed, and this test fails. If the test time is included, select the test time to be a parameter that needs to be used for this read and write test, and further determine whether the test parameter includes the specified number of threads. Among them, the screening steps of test request amount and test time are in no particular order, but in a read and write test, only one test request amount or test time can be used, and cannot be selected at the same time. If it contains the specified number of threads, it will initiate the specified number of threads to call librgw at the same time, read the test file corresponding to the test file size from the preset server, and write the test file to the hard disk of the client until the entire read When the writing time reaches the test time, it stops. Among them, librgw filters out the test files corresponding to the size of the test file according to the file prefix of the file name of the test file. For example, in the test parameters, the test time is 10 minutes, the specified number of threads is 80, and the test file size is 4KB, then 80 threads that call librgw will be initiated at the same time, and 40 read requests and 40 write requests will be sent concurrently. The read rate is 4KB_ The test file at the beginning of the file prefix.
进一步的,若测试指令中不包括指定文件大小,则librgw会自动读取以任意前缀开头的测试文件。比如,测试指令中指定了测试时间为10分钟,指定线程数为80,不指定测试文件大小,那么客户端会同时发起80个调用librgw的线程,并发40个读请求和40个写请求,从预设服务器读取以任意数字前缀开头的测试文件,也就是混合读写任意大小文件的测试。Further, if the specified file size is not included in the test command, librgw will automatically read the test files beginning with any prefix. For example, if the test instruction specifies the test time as 10 minutes, the number of threads is 80, and the test file size is not specified, the client will initiate 80 threads that call librgw at the same time, and concurrently send 40 read requests and 40 write requests. The preset server reads test files beginning with any number prefix, that is, mixed reading and writing tests of files of any size.
进一步的,所述判断是否已经开启智能测试功能的步骤之后,包括:Further, after the step of judging whether the smart test function has been turned on, it includes:
S206:若已经开启智能测试功能,则调用第一预设线程数和预设单位时间,其中,所述第一预设线程数为初次智能测试时读写过程中同时发起的调用librgw的线程总数量,所述预设单位时间为智能测试时整个读写过程的总时间;S206: If the smart test function has been turned on, call the first preset number of threads and the preset unit time, where the first preset number of threads is the total number of threads calling librgw initiated simultaneously during the reading and writing process of the first smart test Quantity, the preset unit time is the total time of the entire reading and writing process during the smart test;
S207:同时发起与所述第一预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从所述预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到基准响应时间,其中,所述基准响应时间为librgw在所述预设单位时间内读写所述测试文件的平均响应时间;S207: Simultaneously initiate a number of separate threads for calling librgw corresponding to the first preset number of threads, and read the test file corresponding to the test file size from the preset server within the preset unit time , And write the test file into the storage space to obtain a reference response time, where the reference response time is an average response time for librgw to read and write the test file within the preset unit time;
S208:根据第一预设规则和所述第一预设线程数计算得到第二预设线程数,以完成计算所述第二预设线程数动作,其中,所述第二预设线程数为二次智能测试时读写过程中同时发起的调用librgw的线程总数量;S208: A second preset number of threads is calculated according to the first preset rule and the first preset number of threads, so as to complete the action of calculating the second preset number of threads, where the second preset number of threads is The total number of threads that call librgw initiated simultaneously during the reading and writing process during the second smart test;
S209:同时发起与所述第二预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从所述预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到二次响应时间,以完成读写所述测试文件动作;S209: Simultaneously initiate a number of separate threads for calling librgw corresponding to the second preset number of threads, and read the test file corresponding to the size of the test file from the preset server within the preset unit time , And write the test file into the storage space to obtain the secondary response time to complete the action of reading and writing the test file;
S2010:判断所述二次响应时间是否大于预设倍数的所述基准响应时间,以完成判断响应时间动作;S2010: Determine whether the secondary response time is greater than the reference response time of a preset multiple, so as to complete the action of determining the response time;
S2011:若小于预设倍数的所述基准响应时间,则循环执行所述计算所述第二预设线程数动作、所述读写所述测试文件动作和所述判断响应时间动作,直至当前次得到的响应时间大于预设倍数的所述基准响应时间,其中,在循环过程中,当前次的第二预设线程数作为下一次的第一预设线程数。S2011: If the reference response time is less than a preset multiple, then cyclically execute the action of calculating the second preset number of threads, the action of reading and writing the test file, and the action of judging the response time until the current time The obtained response time is greater than the reference response time of a preset multiple, wherein, in the loop process, the current second preset number of threads is used as the next first preset number of threads.
本实施例中,用户如果在客户端开启了智能测试功能,则在输入测试指令时,只需要设定测试时间和测试文件大小。客户端如果检测到用户开启了智能测试功能,则自动调取第一预设线程数和预设单位时间。其中,第一预设线程数和预设单位时间可以由用户自己设置具体的数值。客户端同时发起第一预设线程数个调用librgw从预设服务器读取与测试文件大小对应的测试文件,并将测试文件写入客户端的硬盘中,得到librgw在预设单位时间内读写测试文件的平均响应时间,即基准响应时间。然后,根据第一预设规则和第一预设线程数计算得到第二预设线程数,以完成计算第二预设线程数动作。并发起第二预设线程数个调用librgw从预设服务器读取与测试文件大小对应的测试文件,并将测试文件写入客户端的硬盘中,得到librgw在预设单位时间内读写测试文件的平均响应时间,即二次响应时间,以完成读写测试文件动作。其中,第一预设规则具体为:设置有递增线程数,将递增线程数和第一预设线程数的和作为第二预设线程数;或者设置有递增倍数,将递增倍数和第一预设线程数的积作为第二预设线程数。客户端将二次响应时间与预设倍数的基准响应时间进行比对,判断两者之间的大小关系,以完成判断响应时间动作。若二次响应时间大于预设倍数的基准时间,则判定此次的读写测试结束。若二次响应时间小于预设倍数的基准响应时间,则循环执行计算第二预设线程数动作、读写测试文件动作和判断响应时间动作,直至当前次得到的响应时间大于预设倍数的基准响应时间。其中,在循环过程中,当前次的第二预设线程数作为下一次的第一预设线程数。In this embodiment, if the user turns on the smart test function on the client, only the test time and test file size need to be set when inputting a test instruction. If the client detects that the user has activated the smart test function, it will automatically call the first preset number of threads and the preset unit time. Among them, the first preset number of threads and the preset unit time can be set by the user to set specific values. The client simultaneously initiates the first preset thread several calls to librgw to read the test file corresponding to the size of the test file from the preset server, and write the test file to the client's hard disk, to get librgw to read and write the test within the preset unit time The average response time of the file, which is the baseline response time. Then, the second preset number of threads is calculated according to the first preset rule and the first preset number of threads, so as to complete the action of calculating the second preset number of threads. And initiate a number of second preset threads to call librgw to read the test file corresponding to the size of the test file from the preset server, and write the test file to the hard disk of the client, to obtain the reading and writing of the test file in the preset unit time by librgw The average response time, that is, the second response time, to complete the action of reading and writing test files. Among them, the first preset rule is specifically: setting the number of incrementing threads, and taking the sum of the number of incrementing threads and the number of first preset threads as the second preset number of threads; or setting the number of increments, setting the number of increments and the first preset Let the product of the number of threads be the second preset number of threads. The client compares the second response time with the reference response time of a preset multiple, and judges the magnitude relationship between the two to complete the action of judging the response time. If the secondary response time is greater than the reference time of the preset multiple, it is determined that this reading and writing test is over. If the secondary response time is less than the reference response time of the preset multiple, the actions of calculating the second preset number of threads, reading and writing test files, and judging the response time are executed cyclically, until the current response time is greater than the reference multiple of the preset Response time. Among them, in the loop process, the current second preset thread number is used as the next first preset thread number.
进一步的,所述判断所述测试参数中是否包含所述指定线程数的步骤之后,包括:Further, after the step of determining whether the specified number of threads is included in the test parameter, the method includes:
S2012:若不包含所述指定线程数,则调取预先设置的系统线程数;S2012: if the specified number of threads is not included, call the preset number of system threads;
S2013:同时发起与所述系统线程数对应数量的用于调用librgw的线程,在所述测试时间内重复从所述预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间。S2013: Simultaneously initiate a number of threads for invoking librgw corresponding to the number of system threads, repeatedly read the test file corresponding to the size of the test file from the preset server within the test time, and combine the The test file is written to the storage space.
本实施例中,客户端在判断测试参数是否包含指定线程数时,如果测试参数中没有包含指定线程数,为了读写测试能够顺利进行,客户端会自动调取用户预先设置的系统线程数。然后,同时发起系统线程数个调用librgw的线程,从预设服务器中读取与测试文件大小对应的测试文件,并将该测试文件写入客户端的硬盘中,直至整个读写用时达到测试时间则停止。进一步的,客户端如果检测不到预先设置的系统线程数,会自动输出提醒信息,提醒用户及时输入本次读写测试的线程数,以使读写测试可以顺利进行。其中,提醒信息包含系统自定义的至少一个线程数,以供用户选择,并在用户选中后直接根据该选择的线程数进行读写测试。In this embodiment, when the client judges whether the test parameter includes the specified number of threads, if the test parameter does not include the specified number of threads, the client will automatically call the number of system threads preset by the user in order for the read and write test to proceed smoothly. Then, a number of system threads are initiated at the same time to call librgw, read the test file corresponding to the test file size from the preset server, and write the test file to the client's hard disk until the entire read and write time reaches the test time. stop. Further, if the client cannot detect the preset number of system threads, it will automatically output a reminder message to remind the user to enter the number of threads for this read and write test in time, so that the read and write test can proceed smoothly. Among them, the reminder information includes at least one thread number customized by the system for the user to choose, and after the user selects it, the read and write test is directly performed according to the selected thread number.
进一步的,所述分别获取每一次所述librgw读取和写入所述测试文件的读写状态的步骤,包括:Further, the step of separately acquiring the read and write status of each time the librgw reads and writes the test file includes:
S2014:分别计算所述librgw读取和写入的所述测试文件的读取MD5值,并获取预先存储在所述预设服务终端的所述测试文件的上传MD5值;S2014: Calculate the read MD5 value of the test file read and written by the librgw respectively, and obtain the uploaded MD5 value of the test file pre-stored in the preset service terminal;
S2015:判断所述读取MD5值与所述上传MD5值是否相同;S2015: Determine whether the read MD5 value is the same as the uploaded MD5 value;
S2016:若相同,则判定所述librgw读取和写入所述测试文件的读写状态为读写正确;S2016: If they are the same, determine that the read and write status of the test file read and written by the librgw is correct;
S2017:若不相同,则判定所述librgw读取和写入所述测试文件的读写状态为读写错误。S2017: If they are not the same, determine that the read and write status of the test file read and written by the librgw is a read and write error.
本实施例中,MD5是一种通用的数据校验方法,根据MD5的算法,会生成一个字符串,即MD5值,比如:ajk280aidjfoiquporwej。如果文件中的数据有变化,哪怕变了一个字符,那么生成的MD5值也是不相同的,所以根据MD5值来验证下载的文件和上传的文件是种可靠的方式。客户端在生成测试文件时,会生成相应的MD5值,并在将测试文件上传到预设服务器时,将MD5值随同测试文件一起存储在预设服务器中。在完成读写测试后,客户端根据MD5的算法计算librgw从预设服务器读取的测试文件的MD5值,得到读取MD5值。然后从预设服务端获取测试文件的上传MD5值。其中,上传MD5值为测试文件生成后计算得到的MD5值,与将测试文件一起上传到预设服务器进行存储。客户端将测试文件的读取MD5值与上传MD5值进行比对,判断两者是否相同。若不相同,则判定测试文件读写错误,并记录当前次通过librgw读写测试文件的读写状态为读写错误。若相同,则判定测试文件读写正确,并记录当前次通过librgw读写测试文件的读写状态为读写正确。In this embodiment, MD5 is a general data verification method. According to the MD5 algorithm, a character string, that is, the MD5 value, is generated, such as ajk280aidjfoiquporwej. If the data in the file changes, even if one character is changed, the MD5 value generated is not the same. Therefore, it is a reliable way to verify the downloaded file and the uploaded file based on the MD5 value. When the client generates the test file, it will generate the corresponding MD5 value, and when uploading the test file to the preset server, the MD5 value will be stored in the preset server along with the test file. After completing the reading and writing test, the client calculates the MD5 value of the test file read by librgw from the preset server according to the MD5 algorithm, and obtains the read MD5 value. Then get the uploaded MD5 value of the test file from the preset server. Among them, the uploaded MD5 value is the MD5 value calculated after the test file is generated, and the test file is uploaded to the preset server for storage together with the test file. The client compares the read MD5 value of the test file with the uploaded MD5 value to determine whether the two are the same. If they are not the same, it is determined that the test file read and write errors, and the current read and write status of the test file through librgw is recorded as a read and write error. If they are the same, it is determined that the test file is read and written correctly, and the current read and write status of the test file through librgw is recorded as read and write correct.
进一步的,所述测试信息由多组所述测试数据和所述读写状态组成,各组所述测试数据和所述读写状态以一次读写请求进行分组,所述将各所述测试数据和所述读写状态作为测试信息输出到显示界面的步骤,包括:Further, the test information is composed of a plurality of groups of the test data and the read and write status, and each group of the test data and the read and write status is grouped with one read and write request, and the test data is divided into groups. And the step of outputting the read and write status as test information to the display interface includes:
S301:分别将各所述测试数据和所述读写状态按照数据类型进行图表化,生成所述测试信息;S301: Graphing each of the test data and the read-write status according to the data type, respectively, to generate the test information;
S302:将所述测试信息输出到显示界面。S302: Output the test information to the display interface.
本实施例中,客户端在完成读写测试后得到的测试信息是由多组测试数据和读写状态组成的,以每一次读写请求为一组数据。客户端以每次读写请求中不同的参数类型和读写状态为坐标横轴,以每次读写请求中的测试结果为坐标竖轴,将各组数据进行图表化,生成每次读写请求的柱形图。最后,将图表化后的各组测试数据输出到客户端的显示页面,以便用户/测试人员可以直观根据各组数据的柱形图比对出各次读写测试的测试数据之间的差别。In this embodiment, the test information obtained by the client after completing the read and write test is composed of multiple sets of test data and read and write status, and each read and write request is a set of data. The client uses the different parameter types and read and write status in each read and write request as the horizontal axis, and the test result in each read and write request as the vertical axis, and graphs each group of data to generate each read and write The requested bar chart. Finally, the graphed groups of test data are output to the client's display page, so that users/testers can intuitively compare the differences between the test data of each read and write test based on the bar graph of each group of data.
进一步的,所述接收测试指令的步骤之前,包括:Further, before the step of receiving the test instruction, it includes:
S4:获取用户输入的新建文件指令,其中,所述新建文件指令包括指定文件大小和文件类型,所述文件类型为文本、图片或音频;S4: Acquire a new file instruction input by the user, where the new file instruction includes a specified file size and file type, and the file type is text, picture or audio;
S5:根据所述新建文件指令生成随机文件,并在所述随机文件的文件名备注与所述指定文件大小对应的文件前缀,其中,所述随机文件为由随机数据组成的文件;S5: Generate a random file according to the new file instruction, and note the file prefix corresponding to the specified file size in the file name of the random file, where the random file is a file composed of random data;
S6:将备注后的所述随机文件作为测试文件上传到所述预设服务器。S6: Upload the remarked random file as a test file to the preset server.
本实施例中,用户在需要创建新文件时,需要输入新建文件指令到客户端中。其中,新建文件指令包括指定文件大小和文件类型,文件类型为文本、图片或音频。客户端根据新建文件指令,生成与指定文件大小和文件类型均对应的随机文件。其中,具体生成步骤为:当文件类型为文本时,如果文本为随机序列文本,客户端则将0-9的数字和a-Z的大小写字母以及“*”、“&接口(Document Interface),创建指定类型的文件,同时向其中写入随机序列文字,即可生成指定文件大小的随机文本文件。如果文件类型为图片时,客户端采用按照jpg格式,按照三原色RGB的配置,随机生成一组点颜色标,例如(0,0,100,90,80),这个点就描述,(0,0)这个位置上的点颜色为(100,90,80),如此反复填充整张图片,则得到一张全部是随机色的图片,因为可以指定画板的大小,所以大小也是可控的。如果文件类型为音频,因为在电脑解析中,音频是一组数字序列,比如123456代表do,ro,mi等,所以客户端可以随机生成一组数字序列,并将其组合起来,按照Mp3的格式输出成二进制文件,即可得到指定文件大小的随机音频文件。客户端在随机文件的文件名中备注与指定文件大小相同的前缀,并将备注后的随机文件作为测试文件上传到预设服务器,即完成整个创建新文件的过程。 ”、“^”等预置分隔符号,共计93种字符,采用每次生成一组随机序列,例如,第一次生成0123abc....第二次生成iu8kh122,这种方式拼接成完全无序的字符串,生成为指定文件大小的随机序列文本。这种方式生成的文本完全无序,并且每个文件均不相同。如果本文为word和excel格式文件,则采用微软公布的DocumentIn this embodiment, when a user needs to create a new file, he needs to input a new file instruction into the client. Among them, the new file instruction includes specifying the file size and file type, and the file type is text, picture or audio. According to the new file instruction, the client generates a random file corresponding to the specified file size and file type. Among them, the specific generation steps are: when the file type is text, if the text is a random sequence text, the client will create the number 0-9, uppercase and lowercase letters of aZ, and "*", "& Interface (Document Interface) Specify the type of file and write random sequence text into it at the same time to generate a random text file of the specified file size. If the file type is a picture, the client uses the jpg format and the configuration of the three primary colors RGB to randomly generate a set of points Color mark, such as (0,0,100,90,80), this point describes, the color of the point at (0,0) is (100,90,80), so fill the whole picture repeatedly, you get A picture with all random colors, because the size of the drawing board can be specified, so the size is also controllable. If the file type is audio, because in computer analysis, the audio is a set of numbers, such as 123456 for do, ro, mi Etc., so the client can randomly generate a set of digital sequences, combine them, and output them into a binary file according to the format of Mp3, then you can get a random audio file of the specified file size. The client can remark in the file name of the random file with Specify a prefix with the same file size, and upload the random file after the remarks as a test file to the preset server, which completes the process of creating a new file. Preset delimiters such as  " and "^", a total of 93 characters, each Generate a set of random sequences at a time, for example, generate 0123abc for the first time... and generate iu8kh122 for the second time. In this way, it is spliced into a completely disordered string and generated as a random sequence text with a specified file size. The text generated in this way is completely disordered, and each file is different. If this article is a word and excel format file, use the Document published by Microsoft
本实施例提供的一种librgw的性能测试方法,根据用户输入的测试文件大小和测试参数,通过librgw从预设服务器读写对应的测试文件,从而测试出librgw对测试文件进行读写的所有测试信息,并将所有测试信息图形化后输出,从而使得开发人员可以快速得到librgw在读写数据过程中的相关数据,完成针对librgw的性能测试。The performance test method of librgw provided in this embodiment, according to the test file size and test parameters input by the user, reads and writes the corresponding test file from the preset server through librgw, thereby testing all the tests that librgw reads and writes to the test file Information and output all test information graphically, so that developers can quickly get the relevant data of librgw in the process of reading and writing data, and complete the performance test for librgw.
参照图2,本申请一实施例中还提供了一种librgw的性能测试装置,用于多次对测试文件的读取和写入测试,所述测试装置包括:2, an embodiment of the present application also provides a librgw performance test device, which is used for multiple reading and writing tests of test files, and the test device includes:
接收模块1,用于接收测试指令,其中,所述测试指令包括测试文件大小和测试参数;The receiving module 1 is configured to receive a test instruction, where the test instruction includes a test file size and test parameters;
读写模块2,调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,并记录每一次所述librgw对所述测试文件的读取和写入过程中产生的测试数据,以及分别获取每一次所述librgw读取和写入所述测试文件的读写状态;Read and write module 2, call librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record each librgw pair The test data generated during the reading and writing of the test file, and the read and write status of each reading and writing of the test file by the librgw;
输出模块3,用于将各所述测试数据和所述读写状态作为测试信息输出到显示界面。The output module 3 is used to output each of the test data and the read/write status as test information to the display interface.
本实施例中,测试装置各模块、单元的实施例与上述对应的方法步骤一致,在此不作详述。In this embodiment, the embodiments of the modules and units of the test device are consistent with the corresponding method steps described above, and will not be described in detail here.
本实施例提供的一种librgw的性能测试装置,根据用户输入的测试文件大小和测试参数,通过librgw从预设服务器读写对应的测试文件,从而测试出librgw对测试文件进行读写的所有测试信息,并将所有测试信息图形化后输出,从而使得开发人员可以快速得到librgw在读写数据过程中的相关数据,完成针对librgw的性能测试。The performance test device for librgw provided in this embodiment, according to the size of the test file and test parameters input by the user, reads and writes the corresponding test file from the preset server through librgw, thereby testing all the tests that librgw reads and writes to the test file Information and output all test information graphically, so that developers can quickly get the relevant data of librgw in the process of reading and writing data, and complete the performance test for librgw.
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储测试文件等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时执行如上述各方法的实施例的流程。本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。3, an embodiment of the present application also provides a computer device. The computer device may be a server, and its internal structure may be as shown in FIG. 3. The computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer equipment is used to store test files and other data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, the processes of the foregoing method embodiments are executed. Those skilled in the art can understand that the structure shown in FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
本申请一实施例还提供一种计算机可读存储介质,该可读存储介质可以是易失性可读存储介质,也可以是非易失性可读存储介质,其上存储有计算机可读指令,计算机可读指令被处理器执行时,执行如上述各方法的实施例的流程。以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。An embodiment of the present application further provides a computer-readable storage medium. The readable storage medium may be a volatile readable storage medium or a non-volatile readable storage medium on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor, the processes of the above-mentioned method embodiments are executed. The above are only the preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of this application description and drawings, or directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of this application.

Claims (20)

  1. 一种librgw的性能测试方法,用于多次对测试文件的读取和写入测试,其特征在于,所述librgw为访问应用程序,所述方法包括:A performance test method for librgw, used for multiple reading and writing tests of test files, characterized in that the librgw is an access application, and the method includes:
    接收测试指令,其中,所述测试指令包括测试文件大小和测试参数;Receiving a test instruction, where the test instruction includes a test file size and test parameters;
    调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,并记录每一次所述librgw对所述测试文件的读取和写入过程中产生的测试数据,以及分别获取每一次所述librgw读取和写入所述测试文件的读写状态;Call librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record each time the librgw performs the test file Reading and writing test data generated during the process of reading and writing, and respectively acquiring the read and write status of each time the librgw reads and writes the test file;
    将各所述测试数据和所述读写状态作为测试信息输出到显示界面。Each of the test data and the read/write status are output to the display interface as test information.
  2. 根据权利要求1所述的librgw的性能测试方法,其特征在于,所述测试参数包括指定线程数、测试时间和/或测试请求量,所述指定线程数为读写过程中同时发起的调用librgw的线程总数量,所述测试时间为整个读写过程的总时间,所述测试请求量为整个读写过程中读写请求的总次数,所述调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间的步骤,包括:The performance test method of librgw according to claim 1, wherein the test parameters include a designated number of threads, a test time, and/or a test request amount, and the designated number of threads is a call to librgw initiated simultaneously during reading and writing. The total number of threads, the test time is the total time of the entire read and write process, the test request amount is the total number of read and write requests in the entire read and write process, the call librgw is based on the test parameters, respectively from the preset The step of the server reading the test file corresponding to the size of the test file and writing the test file into the storage space includes:
    判断是否已经开启智能测试功能;Determine whether the smart test function has been turned on;
    若没有开启智能测试功能,则判断所述测试参数中是否包含所述测试请求量和/或所述测试时间;If the smart test function is not turned on, determine whether the test parameters include the test request amount and/or the test time;
    若包含所述测试请求量和所述测试时间,则从所述测试请求量和所述测试时间中择一选择一个参数作为当前测试参数;或者,若包含所述测试请求量或所述测试时间,则将包含的所述测试请求量或所述测试时间作为所述当前测试参数;If the test request amount and the test time are included, select one parameter from the test request amount and the test time as the current test parameter; or, if the test request amount or the test time is included , The included test request amount or the test time is used as the current test parameter;
    判断所述测试参数中是否包含所述指定线程数;Determine whether the specified number of threads is included in the test parameter;
    若包含所述指定线程数,则将所述指定线程数和所述当前测试参数组合在一起作为测试条件进行测试,其中,当所述测试条件为所述指定线程数和所述测试时间的时候,在所述测试时间内,同时发起与所述指定线程数对应数量的用于调用librgw的单独线程,重复从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间;或者,当所述测试条件为所述指定线程数和所述测试请求量时,同时发起与所述指定线程对应数量的用于调用librgw的单独线程,重复与所述测试请求量对应数量的从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间的动作,其中,所述测试文件携带有与所述测试文件大小对应的文件前缀。If the specified number of threads is included, the specified number of threads and the current test parameters are combined together as a test condition for testing, wherein, when the test condition is the specified number of threads and the test time , Within the test time, simultaneously initiate a number of separate threads for calling librgw corresponding to the specified number of threads, repeatedly read the test file corresponding to the test file size from the preset server, and add The test file is written into the storage space; or, when the test condition is the specified number of threads and the test request amount, a number of separate threads for calling librgw corresponding to the specified number of threads are initiated simultaneously, Repeat the action of reading the test file corresponding to the size of the test file from the preset server and writing the test file into the storage space corresponding to the amount of test request, wherein the test The file carries a file prefix corresponding to the size of the test file.
  3. 根据权利要求2所述的librgw的性能测试方法,其特征在于,所述判断是否已经开启智能测试功能的步骤之后,包括:The performance test method of librgw according to claim 2, wherein after the step of determining whether the smart test function has been turned on, the method comprises:
    若已经开启智能测试功能,则调用第一预设线程数和预设单位时间,其中,所述第一预设线程数为初次智能测试时读写过程中同时发起的调用librgw的线程总数量,所述预设单位时间为智能测试时整个读写过程的总时间;If the smart test function has been turned on, the first preset number of threads and the preset unit time are called, where the first preset number of threads is the total number of threads calling librgw simultaneously initiated during the read and write process during the first smart test, The preset unit time is the total time of the entire reading and writing process during the smart test;
    同时发起与所述第一预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到基准响应时间,其中,所述基准响应时间为librgw在所述预设单位时间内读写所述测试文件的平均响应时间;Simultaneously initiate a number of separate threads for invoking librgw corresponding to the first preset number of threads, read the test file corresponding to the test file size from the preset server within the preset unit time, and store all The test file is written into the storage space to obtain a reference response time, where the reference response time is an average response time for librgw to read and write the test file within the preset unit time;
    根据第一预设规则和所述第一预设线程数计算得到第二预设线程数,以完成计算所述第二预设线程数动作,其中,所述第二预设线程数为二次智能测试时读写过程中同时发起的调用librgw的线程总数量;The second preset number of threads is calculated according to the first preset rule and the first preset number of threads to complete the action of calculating the second preset number of threads, wherein the second preset number of threads is twice The total number of threads that call librgw initiated at the same time during the reading and writing process of the smart test;
    同时发起与所述第二预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到二次响应时间,以完成读写所述测试文件动作;Simultaneously initiate a number of separate threads for invoking librgw corresponding to the second preset number of threads, read the test file corresponding to the size of the test file from the preset server within the preset unit time, and store all The test file is written into the storage space, and the second response time is obtained to complete the action of reading and writing the test file;
    判断所述二次响应时间是否大于预设倍数的所述基准响应时间,以完成判断响应时间动作;Judging whether the secondary response time is greater than the reference response time of a preset multiple to complete the action of judging the response time;
    若小于预设倍数的所述基准响应时间,则循环执行所述计算所述第二预设线程数动作、所述读写所述测试文件动作和所述判断响应时间动作,直至当前次得到的响应时间大于预设倍数的所述基准响应时间,其中,在循环过程中,当前次的第二预设线程数作为下一次的第一预设线程数。If it is less than the preset multiple of the reference response time, the action of calculating the second preset number of threads, the action of reading and writing the test file, and the action of judging the response time are executed cyclically until the current response time is obtained The response time is greater than the reference response time of a preset multiple, wherein, in the loop process, the current second preset number of threads is used as the next first preset number of threads.
  4. 根据权利要求2所述的librgw的性能测试方法,其特征在于,所述判断所述测试参数中是否包含所述指定线程数的步骤之后,包括:The method for testing the performance of librgw according to claim 2, wherein after the step of determining whether the test parameter includes the designated number of threads, the method comprises:
    若不包含所述指定线程数,则调取预先设置的系统线程数;If the specified number of threads is not included, call the preset number of system threads;
    同时发起与所述系统线程数对应数量的用于调用librgw的线程,在所述测试时间内重复从所述预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间。At the same time, a number of threads for calling librgw corresponding to the number of system threads are initiated, and the test file corresponding to the size of the test file is repeatedly read from the preset server within the test time, and the test file Write to storage space.
  5. 根据权利要求1所述的librgw的性能测试方法,其特征在于,所述分别获取每一次所述librgw读取和写入所述测试文件的读写状态的步骤,包括:The method for testing the performance of librgw according to claim 1, wherein the step of separately obtaining the read and write status of each reading and writing of the test file by the librgw comprises:
    分别计算所述librgw读取和写入的所述测试文件的读取MD5值,并获取预先存储在所述预设服务终端的所述测试文件的上传MD5值;Respectively calculating the read MD5 value of the test file read and written by the librgw, and obtain the uploaded MD5 value of the test file pre-stored in the preset service terminal;
    判断所述读取MD5值与所述上传MD5值是否相同;Determine whether the read MD5 value is the same as the uploaded MD5 value;
    若相同,则判定所述librgw读取和写入所述测试文件的读写状态为读写正确;If they are the same, it is determined that the read and write status of the test file read and written by the librgw is correct;
    若不相同,则判定所述librgw读取和写入所述测试文件的读写状态为读写错误。If they are not the same, it is determined that the read and write status of the test file read and written by the librgw is a read and write error.
  6. 根据权利要求1所述的librgw的性能测试方法,其特征在于,所述测试信息由多组所述测试数据和所述读写状态组成,各组所述测试数据和所述读写状态以一次读写请求进行分组,所述将各所述测试数据和所述读写状态作为测试信息输出到显示界面的步骤,包括:The performance test method of librgw according to claim 1, wherein the test information is composed of multiple sets of the test data and the read/write status, and each set of the test data and the read/write status is performed once The read and write requests are grouped, and the step of outputting each of the test data and the read and write status as test information to a display interface includes:
    分别将各所述测试数据和各所述读写状态按照数据类型进行图表化,生成所述测试信息;Charting each of the test data and each of the read and write states according to the data type to generate the test information;
    将所述测试信息输出到显示界面。The test information is output to the display interface.
  7. 根据权利要求1所述的librgw的性能测试方法,其特征在于,所述接收测试指令的步骤之前,包括:The librgw performance test method according to claim 1, wherein before the step of receiving a test instruction, the method comprises:
    获取用户输入的新建文件指令,其中,所述新建文件指令包括指定文件大小和文件类型,所述文件类型为文本、图片或音频;Acquiring a new file instruction input by a user, where the new file instruction includes a specified file size and file type, and the file type is text, picture or audio;
    根据所述新建文件指令生成随机文件,并在所述随机文件的文件名备注与所述指定文件大小对应的文件前缀,其中,所述随机文件为由随机数据组成的文件;Generate a random file according to the new file instruction, and note the file prefix corresponding to the specified file size in the file name of the random file, wherein the random file is a file composed of random data;
    将备注后的所述随机文件作为测试文件上传到所述预设服务器。Upload the remarked random file as a test file to the preset server.
  8. 一种librgw的性能测试装置,用于多次对测试文件的读取和写入测试,其特征在于,包括:A performance testing device for librgw, which is used for multiple reading and writing tests of test files, and is characterized in that it includes:
    接收模块,用于接收测试指令,其中,所述测试指令包括测试文件大小和测试参数;A receiving module for receiving a test instruction, where the test instruction includes a test file size and test parameters;
    读写模块,调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,并记录每一次所述librgw对所述测试文件的读取和写入过程中产生的测试数据,以及分别获取每一次所述librgw读取和写入所述测试文件的读写状态;The read-write module calls librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record every time the librgw performs the test The test data generated during the reading and writing of the test file, and the read and write status of each reading and writing of the test file by the librgw;
    输出模块,用于将各所述测试数据和所述读写状态作为测试信息输出到显示界面。The output module is used to output each of the test data and the read/write status as test information to the display interface.
  9. 根据权利要求8所述的librgw的性能测试装置,其特征在于,所述测试参数包括指定线程数、测试时间和/或测试请求量,所述指定线程数为读写过程中同时发起的调用librgw的线程总数量,所述测试时间为整个读写过程的总时间,所述测试请求量为整个读写过程中读写请求的总次数,所述读写模块,包括:The librgw performance test device according to claim 8, wherein the test parameters include a designated number of threads, a test time, and/or a test request amount, and the designated number of threads is a call to librgw initiated simultaneously during reading and writing. The total number of threads, the test time is the total time of the entire read and write process, and the test request volume is the total number of read and write requests in the entire read and write process. The read and write module includes:
    第一判断单元,用于判断是否已经开启智能测试功能;The first judgment unit is used to judge whether the smart test function has been turned on;
    第二判断单元,用于判断所述测试参数中是否包含所述测试请求量和/或所述测试时间;The second judgment unit is used to judge whether the test parameter includes the test request amount and/or the test time;
    选择单元,用于从所述测试请求量和所述测试时间中择一选择一个参数作为当前测试参数;或者,若包含所述测试请求量或所述测试时间,则将包含的所述测试请求量或所述测试时间作为所述当前测试参数;The selection unit is configured to select one parameter from the test request amount and the test time as the current test parameter; or, if the test request amount or the test time is included, the included test request Or the test time as the current test parameter;
    第三判断单元,用于判断所述测试参数中是否包含所述指定线程数;The third judgment unit is used to judge whether the specified number of threads is included in the test parameter;
    第一读写单元,用于将所述指定线程数和所述当前测试参数组合在一起作为测试条件进行测试,其中,当所述测试条件为所述指定线程数和所述测试时间的时候,在所述测试时间内,同时发起与所述指定线程数对应数量的用于调用librgw的单独线程,重复从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间;或者,当所述测试条件为所述指定线程数和所述测试请求量时,同时发起与所述指定线程对应数量的用于调用librgw的单独线程,重复与所述测试请求量对应数量的从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间的动作,其中,所述测试文件携带有与所述测试文件大小对应的文件前缀。The first read-write unit is configured to combine the specified number of threads and the current test parameters as a test condition for testing, wherein, when the test condition is the specified number of threads and the test time, During the test time, a number of separate threads for invoking librgw corresponding to the specified number of threads are simultaneously initiated, the test file corresponding to the test file size is repeatedly read from the preset server, and all The test file is written into the storage space; or, when the test condition is the designated number of threads and the test request amount, a number of separate threads for calling librgw corresponding to the designated thread are initiated at the same time, and repeat The action of reading the test file corresponding to the size of the test file from the preset server in a quantity corresponding to the test request amount and writing the test file into the storage space, wherein the test file It carries a file prefix corresponding to the size of the test file.
  10. 根据权利要求9所述的librgw的性能测试装置,其特征在于,所述读写模块,还包括:The librgw performance testing device according to claim 9, characterized in that the read-write module further comprises:
    调用单元,用于调用第一预设线程数和预设单位时间,其中,所述第一预设线程数为初次智能测试时读写过程中同时发起的调用librgw的线程总数量,所述预设单位时间为智能测试时整个读写过程的总时间;The calling unit is used to call the first preset number of threads and the preset unit time, where the first preset number of threads is the total number of threads calling librgw initiated at the same time during the reading and writing process of the initial smart test, and the preset Set the unit time as the total time of the entire read and write process during the smart test;
    第二读写单元,用于同时发起与所述第一预设线程数对应数量的用于调用librgw的单独线程,从所述预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到基准响应时间,其中,所述基准响应时间为librgw在所述预设单位时间内读写所述测试文件的平均响应时间;The second read-write unit is configured to simultaneously initiate a number of separate threads for invoking librgw corresponding to the first preset number of threads, read the test file corresponding to the size of the test file from the preset server, and Writing the test file into the storage space to obtain a reference response time, where the reference response time is an average response time of librgw for reading and writing the test file within the preset unit time;
    第一计算单元,用于根据第一预设规则和所述第一预设线程数计算得到第二预设线程数,以完成计算所述第二预设线程数动作,其中,所述第二预设线程数为二次智能测试时读写过程中同时发起的调用librgw的线程总数量;The first calculation unit is configured to calculate the second preset number of threads according to the first preset rule and the first preset number of threads, so as to complete the action of calculating the second preset number of threads, wherein the second The preset number of threads is the total number of threads that call librgw initiated at the same time during the reading and writing process of the second smart test;
    第三读写单元,用于同时发起与所述第二预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从所述预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到二次响应时间,以完成读写所述测试文件动作;The third read-write unit is configured to simultaneously initiate a number of separate threads for calling librgw corresponding to the second preset number of threads, and read and test from the preset server within the preset unit time A test file corresponding to the file size, and write the test file into the storage space to obtain a secondary response time to complete the action of reading and writing the test file;
    第四判断单元,用于判断所述二次响应时间是否大于预设倍数的所述基准响应时间,以完成判断响应时间动作;The fourth judging unit is used to judge whether the secondary response time is greater than the reference response time of a preset multiple to complete the action of judging the response time;
    循环单元,用于循环执行所述计算所述第二预设线程数动作、所述读写所述测试文件动作和所述判断响应时间动作,直至当前次得到的响应时间大于预设倍数的所述基准响应时间,其中,在循环过程中,当前次的第二预设线程数作为下一次的第一预设线程数。The loop unit is configured to cyclically execute the action of calculating the second preset number of threads, the action of reading and writing the test file, and the action of judging the response time until the response time currently obtained is greater than the preset multiple. The reference response time, wherein, in the loop process, the current second preset thread number is used as the next first preset thread number.
  11. 根据权利要求9所述的librgw的性能测试装置,其特征在于,所述读写模块,还包括:The librgw performance testing device according to claim 9, characterized in that the read-write module further comprises:
    调取单元,用于调取预先设置的系统线程数;The call unit is used to call the preset number of system threads;
    发起单元,用于同时发起与所述系统线程数对应数量的用于调用librgw的线程,在所述测试时间内重复从所述预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间。The initiating unit is configured to simultaneously initiate a number of threads for invoking librgw corresponding to the number of system threads, and repeatedly read the test file corresponding to the test file size from the preset server during the test time, and Write the test file into the storage space.
  12. 根据权利要求8所述的librgw的性能测试装置,其特征在于,所述读写模块,还包括:The librgw performance test device according to claim 8, wherein the read-write module further comprises:
    第二计算单元,用于分别计算所述librgw读取和写入的所述测试文件的读取MD5值,并获取预先存储在所述预设服务终端的所述测试文件的上传MD5值;The second calculation unit is configured to calculate the read MD5 value of the test file read and written by the librgw, and obtain the uploaded MD5 value of the test file pre-stored in the preset service terminal;
    第五判断单元,用于判断所述读取MD5值与所述上传MD5值是否相同;The fifth determining unit is used to determine whether the read MD5 value is the same as the uploaded MD5 value;
    第一判定单元,用于判定所述librgw读取和写入所述测试文件的读写状态为读写正确;The first determining unit is used to determine that the read and write status of the test file read and written by the librgw is correct;
    第二判定单元,用于判定所述librgw读取和写入所述测试文件的读写状态为读写错误。The second judging unit is used to judge that the read and write status of the test file read and written by the librgw is a read and write error.
  13. 根据权利要求8所述的,librgw的性能测试装置,其特征在于,所述测试信息由多组所述测试数据和所述读写状态组成,各组所述测试数据和所述读写状态以一次读写请求进行分组,所述输出模块,包括:The performance testing device of librgw according to claim 8, wherein the test information is composed of multiple sets of the test data and the read/write status, and each set of the test data and the read/write status is One-time read and write requests are grouped, and the output module includes:
    生成单元,用于分别将各所述测试数据和各所述读写状态按照数据类型进行图表化,生成所述测试信息;A generating unit, configured to graph each of the test data and each of the read and write states according to the data type to generate the test information;
    输出单元,用于将所述测试信息输出到显示界面。The output unit is used to output the test information to the display interface.
  14. 根据权利要求8所述的librgw的性能测试装置,其特征在于,所述测试装置,还包括:The librgw performance test device according to claim 8, wherein the test device further comprises:
    获取模块,用于获取用户输入的新建文件指令,其中,所述新建文件指令包括指定文件大小和文件类型,所述文件类型为文本、图片或音频;The obtaining module is configured to obtain a new file instruction input by a user, wherein the new file instruction includes a specified file size and file type, and the file type is text, picture or audio;
    生成模块,用于根据所述新建文件指令生成随机文件,并在所述随机文件的文件名备注与所述指定文件大小对应的文件前缀,其中,所述随机文件为由随机数据组成的文件;A generating module, configured to generate a random file according to the new file instruction, and note a file prefix corresponding to the specified file size in the file name of the random file, where the random file is a file composed of random data;
    上传模块,用于将备注后的所述随机文件作为测试文件上传到所述预设服务器。The upload module is configured to upload the remarked random file as a test file to the preset server.
  15. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,其特征在于,所述处理器执行时实现librgw的性能测试方法,所述librgw为访问应用程序,该性能测试方法包括:A computer device includes a memory and a processor, and computer-readable instructions are stored in the memory, wherein the performance test method of librgw is realized when the processor is executed, and the librgw is an access application program. Methods include:
    接收测试指令,其中,所述测试指令包括测试文件大小和测试参数;Receiving a test instruction, where the test instruction includes a test file size and test parameters;
    调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,并记录每一次所述librgw对所述测试文件的读取和写入过程中产生的测试数据,以及分别获取每一次所述librgw读取和写入所述测试文件的读写状态;Call librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record each time the librgw performs the test file Reading and writing test data generated during the process of reading and writing, and respectively acquiring the read and write status of each time the librgw reads and writes the test file;
    将各所述测试数据和所述读写状态作为测试信息输出到显示界面。Each of the test data and the read/write status are output to the display interface as test information.
  16. 根据权利要求15所述的计算机设备,其特征在于,所述测试参数包括指定线程数、测试时间和/或测试请求量,所述指定线程数为读写过程中同时发起的调用librgw的线程总数量,所述测试时间为整个读写过程的总时间,所述测试请求量为整个读写过程中读写请求的总次数;所述处理器执行所述调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间的步骤,包括:The computer device according to claim 15, wherein the test parameters include a designated number of threads, a test time, and/or a test request amount, and the designated number of threads is the total number of threads that call librgw initiated simultaneously during reading and writing. The test time is the total time of the entire read and write process, and the test request amount is the total number of read and write requests in the entire read and write process; the processor executes the call librgw according to the test parameters, respectively from The step of the preset server reading the test file corresponding to the size of the test file and writing the test file into the storage space includes:
    判断是否已经开启智能测试功能;Determine whether the smart test function has been turned on;
    若没有开启智能测试功能,则判断所述测试参数中是否包含所述测试请求量和/或所述测试时间;If the smart test function is not turned on, determine whether the test parameters include the test request amount and/or the test time;
    若包含所述测试请求量和所述测试时间,则从所述测试请求量和所述测试时间中择一选择一个参数作为当前测试参数;或者,若包含所述测试请求量或所述测试时间,则将包含的所述测试请求量或所述测试时间作为所述当前测试参数;If the test request amount and the test time are included, select one parameter from the test request amount and the test time as the current test parameter; or, if the test request amount or the test time is included , The included test request amount or the test time is used as the current test parameter;
    判断所述测试参数中是否包含所述指定线程数;Determine whether the specified number of threads is included in the test parameter;
    若包含所述指定线程数,则将所述指定线程数和所述当前测试参数组合在一起作为测试条件进行测试,其中,当所述测试条件为所述指定线程数和所述测试时间的时候,在所述测试时间内,同时发起与所述指定线程数对应数量的用于调用librgw的单独线程,重复从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间;或者,当所述测试条件为所述指定线程数和所述测试请求量时,同时发起与所述指定线程对应数量的用于调用librgw的单独线程,重复与所述测试请求量对应数量的从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间的动作,其中,所述测试文件携带有与所述测试文件大小对应的文件前缀。If the specified number of threads is included, the specified number of threads and the current test parameters are combined together as a test condition for testing, wherein, when the test condition is the specified number of threads and the test time , Within the test time, simultaneously initiate a number of separate threads for calling librgw corresponding to the specified number of threads, repeatedly read the test file corresponding to the test file size from the preset server, and add The test file is written into the storage space; or, when the test condition is the specified number of threads and the test request amount, a number of separate threads for calling librgw corresponding to the specified number of threads are initiated simultaneously, Repeat the action of reading the test file corresponding to the size of the test file from the preset server and writing the test file into the storage space corresponding to the amount of test request, wherein the test The file carries a file prefix corresponding to the size of the test file.
  17. 根据权利要求16所述的计算机设备,其特征在于,所述处理器执行所述判断是否已经开启智能测试功能的步骤之后,包括:The computer device according to claim 16, wherein after the processor executes the step of determining whether the smart test function has been turned on, it comprises:
    若已经开启智能测试功能,则调用第一预设线程数和预设单位时间,其中,所述第一预设线程数为初次智能测试时读写过程中同时发起的调用librgw的线程总数量,所述预设单位时间为智能测试时整个读写过程的总时间;If the smart test function has been turned on, the first preset number of threads and the preset unit time are called, where the first preset number of threads is the total number of threads calling librgw simultaneously initiated during the read and write process during the first smart test, The preset unit time is the total time of the entire reading and writing process during the smart test;
    同时发起与所述第一预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到基准响应时间,其中,所述基准响应时间为librgw在所述预设单位时间内读写所述测试文件的平均响应时间;Simultaneously initiate a number of separate threads for invoking librgw corresponding to the first preset number of threads, read the test file corresponding to the test file size from the preset server within the preset unit time, and store all The test file is written into the storage space to obtain a reference response time, where the reference response time is an average response time for librgw to read and write the test file within the preset unit time;
    根据第一预设规则和所述第一预设线程数计算得到第二预设线程数,以完成计算所述第二预设线程数动作,其中,所述第二预设线程数为二次智能测试时读写过程中同时发起的调用librgw的线程总数量;The second preset number of threads is calculated according to the first preset rule and the first preset number of threads to complete the action of calculating the second preset number of threads, wherein the second preset number of threads is twice The total number of threads that call librgw initiated at the same time during the reading and writing process of the smart test;
    同时发起与所述第二预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到二次响应时间,以完成读写所述测试文件动作;Simultaneously initiate a number of separate threads for invoking librgw corresponding to the second preset number of threads, read the test file corresponding to the size of the test file from the preset server within the preset unit time, and store all The test file is written into the storage space, and the second response time is obtained to complete the action of reading and writing the test file;
    判断所述二次响应时间是否大于预设倍数的所述基准响应时间,以完成判断响应时间动作;Judging whether the secondary response time is greater than the reference response time of a preset multiple to complete the action of judging the response time;
    若小于预设倍数的所述基准响应时间,则循环执行所述计算所述第二预设线程数动作、所述读写所述测试文件动作和所述判断响应时间动作,直至当前次得到的响应时间大于预设倍数的所述基准响应时间,其中,在循环过程中,当前次的第二预设线程数作为下一次的第一预设线程数。If it is less than the preset multiple of the reference response time, the action of calculating the second preset number of threads, the action of reading and writing the test file, and the action of judging the response time are executed cyclically until the current response time is obtained The response time is greater than the reference response time of a preset multiple, wherein, in the loop process, the current second preset number of threads is used as the next first preset number of threads.
  18. 一种计算机可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现librgw的性能测试方法,所述librgw为访问应用程序,该性能测试方法包括:A computer-readable storage medium having computer-readable instructions stored thereon is characterized in that when the computer-readable instructions are executed by a processor, a performance test method of librgw is implemented, and the librgw is an access application program, and the performance test Methods include:
    接收测试指令,其中,所述测试指令包括测试文件大小和测试参数;Receiving a test instruction, where the test instruction includes a test file size and test parameters;
    调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,并记录每一次所述librgw对所述测试文件的读取和写入过程中产生的测试数据,以及分别获取每一次所述librgw读取和写入所述测试文件的读写状态;Call librgw to read the test file corresponding to the size of the test file from the preset server according to the test parameters, write the test file into the storage space, and record each time the librgw performs the test file Reading and writing test data generated during the process of reading and writing, and respectively acquiring the read and write status of each time the librgw reads and writes the test file;
    将各所述测试数据和所述读写状态作为测试信息输出到显示界面。Each of the test data and the read/write status are output to the display interface as test information.
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述测试参数包括指定线程数、测试时间和/或测试请求量,所述指定线程数为读写过程中同时发起的调用librgw的线程总数量,所述测试时间为整个读写过程的总时间,所述测试请求量为整个读写过程中读写请求的总次数;所述处理器执行所述调用librgw按照所述测试参数,分别从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间的步骤,包括:The computer-readable storage medium according to claim 18, wherein the test parameters include a designated number of threads, a test time, and/or a test request amount, and the designated number of threads is a call to librgw initiated simultaneously during a reading and writing process. The total number of threads, the test time is the total time of the entire read and write process, the test request volume is the total number of read and write requests in the entire read and write process; the processor executes the call librgw according to the test parameters , The steps of respectively reading the test file corresponding to the size of the test file from the preset server and writing the test file into the storage space includes:
    判断是否已经开启智能测试功能;Determine whether the smart test function has been turned on;
    若没有开启智能测试功能,则判断所述测试参数中是否包含所述测试请求量和/或所述测试时间;If the smart test function is not turned on, determine whether the test parameters include the test request amount and/or the test time;
    若包含所述测试请求量和所述测试时间,则从所述测试请求量和所述测试时间中择一选择一个参数作为当前测试参数;或者,若包含所述测试请求量或所述测试时间,则将包含的所述测试请求量或所述测试时间作为所述当前测试参数;If the test request amount and the test time are included, select one parameter from the test request amount and the test time as the current test parameter; or, if the test request amount or the test time is included , The included test request amount or the test time is used as the current test parameter;
    判断所述测试参数中是否包含所述指定线程数;Determine whether the specified number of threads is included in the test parameter;
    若包含所述指定线程数,则将所述指定线程数和所述当前测试参数组合在一起作为测试条件进行测试,其中,当所述测试条件为所述指定线程数和所述测试时间的时候,在所述测试时间内,同时发起与所述指定线程数对应数量的用于调用librgw的单独线程,重复从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间;或者,当所述测试条件为所述指定线程数和所述测试请求量时,同时发起与所述指定线程对应数量的用于调用librgw的单独线程,重复与所述测试请求量对应数量的从所述预设服务器读取所述测试文件大小对应的所述测试文件,并将所述测试文件写入所述存储空间的动作,其中,所述测试文件携带有与所述测试文件大小对应的文件前缀。If the specified number of threads is included, the specified number of threads and the current test parameters are combined together as a test condition for testing, wherein, when the test condition is the specified number of threads and the test time , Within the test time, simultaneously initiate a number of separate threads for calling librgw corresponding to the specified number of threads, repeatedly read the test file corresponding to the test file size from the preset server, and add The test file is written into the storage space; or, when the test condition is the specified number of threads and the test request amount, a number of separate threads for calling librgw corresponding to the specified number of threads are initiated simultaneously, Repeat the action of reading the test file corresponding to the size of the test file from the preset server and writing the test file into the storage space corresponding to the amount of test request, wherein the test The file carries a file prefix corresponding to the size of the test file.
  20. 根据权利要求19所述的计算机可读存储介质,其特征在于,所述处理器执行所述判断是否已经开启智能测试功能的步骤之后,包括:The computer-readable storage medium according to claim 19, wherein after the processor executes the step of determining whether the smart test function has been turned on, the method comprises:
    若已经开启智能测试功能,则调用第一预设线程数和预设单位时间,其中,所述第一预设线程数为初次智能测试时读写过程中同时发起的调用librgw的线程总数量,所述预设单位时间为智能测试时整个读写过程的总时间;If the smart test function has been turned on, the first preset number of threads and the preset unit time are called, where the first preset number of threads is the total number of threads calling librgw simultaneously initiated during the read and write process during the first smart test, The preset unit time is the total time of the entire reading and writing process during the smart test;
    同时发起与所述第一预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到基准响应时间,其中,所述基准响应时间为librgw在所述预设单位时间内读写所述测试文件的平均响应时间;Simultaneously initiate a number of separate threads for invoking librgw corresponding to the first preset number of threads, read the test file corresponding to the test file size from the preset server within the preset unit time, and store all The test file is written into the storage space to obtain a reference response time, where the reference response time is an average response time for librgw to read and write the test file within the preset unit time;
    根据第一预设规则和所述第一预设线程数计算得到第二预设线程数,以完成计算所述第二预设线程数动作,其中,所述第二预设线程数为二次智能测试时读写过程中同时发起的调用librgw的线程总数量;The second preset number of threads is calculated according to the first preset rule and the first preset number of threads to complete the action of calculating the second preset number of threads, wherein the second preset number of threads is twice The total number of threads that call librgw initiated at the same time during the reading and writing process of the smart test;
    同时发起与所述第二预设线程数对应数量的用于调用librgw的单独线程,在所述预设单位时间内从预设服务器读取与所述测试文件大小对应的测试文件,并将所述测试文件写入存储空间,得到二次响应时间,以完成读写所述测试文件动作;Simultaneously initiate a number of separate threads for invoking librgw corresponding to the second preset number of threads, read the test file corresponding to the size of the test file from the preset server within the preset unit time, and store all The test file is written into the storage space, and the second response time is obtained to complete the action of reading and writing the test file;
    判断所述二次响应时间是否大于预设倍数的所述基准响应时间,以完成判断响应时间动作;Judging whether the secondary response time is greater than the reference response time of a preset multiple to complete the action of judging the response time;
    若小于预设倍数的所述基准响应时间,则循环执行所述计算所述第二预设线程数动作、所述读写所述测试文件动作和所述判断响应时间动作,直至当前次得到的响应时间大于预设倍数的所述基准响应时间,其中,在循环过程中,当前次的第二预设线程数作为下一次的第一预设线程数。If it is less than the preset multiple of the reference response time, the action of calculating the second preset number of threads, the action of reading and writing the test file, and the action of judging the response time are executed cyclically until the current response time is obtained The response time is greater than the reference response time of a preset multiple, wherein, in the loop process, the current second preset number of threads is used as the next first preset number of threads.
PCT/CN2019/116336 2019-02-11 2019-11-07 Librgw performance test method and apparatus, and computer device WO2020164263A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910110284.2 2019-02-11
CN201910110284.2A CN109976957B (en) 2019-02-11 2019-02-11 Librgw performance test method and device and computer equipment

Publications (1)

Publication Number Publication Date
WO2020164263A1 true WO2020164263A1 (en) 2020-08-20

Family

ID=67076908

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/116336 WO2020164263A1 (en) 2019-02-11 2019-11-07 Librgw performance test method and apparatus, and computer device

Country Status (2)

Country Link
CN (1) CN109976957B (en)
WO (1) WO2020164263A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094278A (en) * 2021-04-23 2021-07-09 Tcl通讯(宁波)有限公司 Debugging method, device and equipment of mobile terminal and computer readable storage medium
CN113312255A (en) * 2021-04-21 2021-08-27 深圳市沃特沃德信息有限公司 Parameter testing method and device for peripheral component of mobile equipment
CN113806192A (en) * 2021-08-19 2021-12-17 济南浪潮数据技术有限公司 Picture cloud storage performance testing method and device, terminal and storage medium
CN114297009A (en) * 2021-12-28 2022-04-08 苏州浪潮智能科技有限公司 Server testing method and device and electronic equipment
CN114741293A (en) * 2022-04-02 2022-07-12 浙江中控技术股份有限公司 Modbus communication automatic testing method of industrial control system
CN115407385A (en) * 2022-07-21 2022-11-29 上海轩田工业设备有限公司 Multipoint automatic test method and system for electric propulsion beam current
CN115966247A (en) * 2022-12-14 2023-04-14 武汉麓谷科技有限公司 ZNS solid state disk performance test method
CN116684913A (en) * 2023-06-25 2023-09-01 上海移柯通信技术股份有限公司 4G communication module testing method, system, electronic equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976957B (en) * 2019-02-11 2022-04-15 平安科技(深圳)有限公司 Librgw performance test method and device and computer equipment
CN115658450B (en) * 2022-10-20 2023-05-16 广州思智时代科技有限公司 Software testing system
CN116521465B (en) * 2023-06-26 2023-10-13 深圳市晶存科技有限公司 Hard disk test data processing method, device and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8732343B1 (en) * 2009-12-16 2014-05-20 Symantec Corporation Systems and methods for creating dataless storage systems for testing software systems
CN106685747A (en) * 2015-11-05 2017-05-17 北京出入境检验检疫局检验检疫技术中心 Cloud storage balance performance testing system
CN107480039A (en) * 2017-09-22 2017-12-15 郑州云海信息技术有限公司 The small documents readwrite performance method of testing and device of a kind of distributed memory system
US20180165323A1 (en) * 2016-12-09 2018-06-14 EMC IP Holding Company LLC Data set verification
CN108733525A (en) * 2018-06-07 2018-11-02 郑州云海信息技术有限公司 A kind of memory module tests and verifies the method and system of correctness automatically
CN109976957A (en) * 2019-02-11 2019-07-05 平安科技(深圳)有限公司 Performance test methods, device and the computer equipment of librgw

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211294A (en) * 2006-12-26 2008-07-02 环达电脑(上海)有限公司 Display memory test system and method
TW201232253A (en) * 2011-01-24 2012-08-01 Hon Hai Prec Ind Co Ltd System and method for arranging test data
CN108009071B (en) * 2017-12-05 2020-10-20 苏州浪潮智能科技有限公司 Hadoop cluster test method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8732343B1 (en) * 2009-12-16 2014-05-20 Symantec Corporation Systems and methods for creating dataless storage systems for testing software systems
CN106685747A (en) * 2015-11-05 2017-05-17 北京出入境检验检疫局检验检疫技术中心 Cloud storage balance performance testing system
US20180165323A1 (en) * 2016-12-09 2018-06-14 EMC IP Holding Company LLC Data set verification
CN107480039A (en) * 2017-09-22 2017-12-15 郑州云海信息技术有限公司 The small documents readwrite performance method of testing and device of a kind of distributed memory system
CN108733525A (en) * 2018-06-07 2018-11-02 郑州云海信息技术有限公司 A kind of memory module tests and verifies the method and system of correctness automatically
CN109976957A (en) * 2019-02-11 2019-07-05 平安科技(深圳)有限公司 Performance test methods, device and the computer equipment of librgw

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312255A (en) * 2021-04-21 2021-08-27 深圳市沃特沃德信息有限公司 Parameter testing method and device for peripheral component of mobile equipment
CN113094278B (en) * 2021-04-23 2024-01-02 光环云数据有限公司 Method, device, equipment and computer readable storage medium for debugging mobile terminal
CN113094278A (en) * 2021-04-23 2021-07-09 Tcl通讯(宁波)有限公司 Debugging method, device and equipment of mobile terminal and computer readable storage medium
CN113806192A (en) * 2021-08-19 2021-12-17 济南浪潮数据技术有限公司 Picture cloud storage performance testing method and device, terminal and storage medium
CN114297009A (en) * 2021-12-28 2022-04-08 苏州浪潮智能科技有限公司 Server testing method and device and electronic equipment
CN114297009B (en) * 2021-12-28 2024-01-16 苏州浪潮智能科技有限公司 Method and device for testing server and electronic equipment
CN114741293A (en) * 2022-04-02 2022-07-12 浙江中控技术股份有限公司 Modbus communication automatic testing method of industrial control system
CN114741293B (en) * 2022-04-02 2024-07-23 浙江中控技术股份有限公司 Modbus communication automatic test method of industrial control system
CN115407385A (en) * 2022-07-21 2022-11-29 上海轩田工业设备有限公司 Multipoint automatic test method and system for electric propulsion beam current
CN115407385B (en) * 2022-07-21 2024-03-08 上海轩田智能科技股份有限公司 Multi-point automatic test method and system for electric propulsion beam
CN115966247A (en) * 2022-12-14 2023-04-14 武汉麓谷科技有限公司 ZNS solid state disk performance test method
CN115966247B (en) * 2022-12-14 2023-08-22 武汉麓谷科技有限公司 ZNS solid state disk performance test method
CN116684913A (en) * 2023-06-25 2023-09-01 上海移柯通信技术股份有限公司 4G communication module testing method, system, electronic equipment and storage medium
CN116684913B (en) * 2023-06-25 2024-02-13 上海移柯通信技术股份有限公司 4G communication module testing method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109976957A (en) 2019-07-05
CN109976957B (en) 2022-04-15

Similar Documents

Publication Publication Date Title
WO2020164263A1 (en) Librgw performance test method and apparatus, and computer device
CN108897691B (en) Data processing method, device, server and medium based on interface simulation service
WO2020000706A1 (en) Database comparison-based interface testing method and system, device and storage medium
CN110022315B (en) Weight management method, device and equipment in block chain type account book
CN106598922B (en) Character string conversion method and system
CN109033150A (en) Sensitive word verification method, device, computer equipment and storage medium
TWI762851B (en) Data verification method, system, device and equipment in blockchain ledger
CN113535720A (en) Index creating method, device and equipment in block chain type account book
CN110209569A (en) Interface test method, interface test device and storage medium
CN112487492A (en) Data verification method, system and equipment
CN109614271A (en) Control method, device, equipment and the storage medium of multiple company-data consistency
CN109324958A (en) A kind of REST unifies method of calibration, device, equipment and readable storage medium storing program for executing
CN108776665B (en) Data processing method and device
CN109739655A (en) A kind of parameter setting method and device of gRPC request
CN110059087B (en) Data attribute identification method, device and equipment in block chain type account book
CN114443039A (en) Input parameter verification method and device, electronic equipment and storage medium
CN112052157A (en) Test message construction method, device and system
CN112242177A (en) Memory testing method and device, computer readable storage medium and electronic equipment
US10866711B1 (en) Providing account information to applications
CN115757165A (en) Automatic testing method, device, equipment and storage medium
US11706164B2 (en) Graph-based natural language generation for conversational systems
CN109857735A (en) A kind of data configuration method and system carrying out regular description by excel
US9660983B2 (en) Counter sets for copies of one time password tokens
CN104281534B (en) A kind of method and apparatus for storing metadata
CN110636042B (en) Method, device and equipment for updating verified block height of server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19915277

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.12.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19915277

Country of ref document: EP

Kind code of ref document: A1