WO2021052220A1 - Cloud storage interface test method and apparatus - Google Patents

Cloud storage interface test method and apparatus Download PDF

Info

Publication number
WO2021052220A1
WO2021052220A1 PCT/CN2020/114050 CN2020114050W WO2021052220A1 WO 2021052220 A1 WO2021052220 A1 WO 2021052220A1 CN 2020114050 W CN2020114050 W CN 2020114050W WO 2021052220 A1 WO2021052220 A1 WO 2021052220A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
time
cloud storage
storage
operations
Prior art date
Application number
PCT/CN2020/114050
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 WO2021052220A1 publication Critical patent/WO2021052220A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3414Workload generation, e.g. scripts, playback
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time

Definitions

  • the embodiments of the present application relate to, but are not limited to, the field of testing, and particularly refer to a method and device for testing cloud storage interfaces.
  • the security system has now become an indispensable part of life. Whether it is residential communities, road monitoring, or more demanding intelligent security, etc., it has been widely used in life.
  • the embodiments of the present application provide a method and device for testing a cloud storage interface.
  • the embodiment of the application provides a method for testing a cloud storage interface, including: configuring a test item; wherein the test item includes: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the operation, and the operation The number of files, as well as the operation block size, file path, and operation times corresponding to each file; among them, the operations include any one or more of the following: read, write, delete; start N threads, through N threads according to the configured cloud storage
  • the storage mode of the server and the address information of the cloud storage server access the interface of the cloud storage server to open the i-th file corresponding to the configured i-th file path, and perform P i operations on the i-th file; where N is the configuration
  • the number of threads, i is an integer from 1 to M
  • M is the number of configured files
  • P i is the number of operations corresponding to the configured i-th file
  • the block size of each i-th file is the configured i-th file Cor
  • An embodiment of the application provides a device for testing a cloud storage interface, including a processor and a computer-readable storage medium.
  • the computer-readable storage medium stores instructions. When the instructions are executed by the processor, Any of the above methods for testing cloud storage interfaces.
  • the embodiment of the present application 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 foregoing methods for testing a cloud storage interface are implemented.
  • the embodiment of the present application provides a device for testing a cloud storage interface, including: a configuration module for configuring test items; wherein the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, and the number of threads , Operation, the number of files to be operated, and the corresponding operation block size, file path and operation times of each file; among them, the operation includes any one or more of the following: read, write, delete; test module, used to start N threads , Through N threads to access the interface of the cloud storage server according to the storage mode of the configured cloud storage server and the address information of the cloud storage server, to open the i-th file corresponding to the configured i-th file path, and perform processing on the i-th file P i operations; where N is the number of threads configured, i is an integer from 1 to M, M is the number of files configured, and P i is the number of operations corresponding to the i-th file configured; each operation of the i-th file
  • the block size of
  • FIG. 1 is a flowchart of a method for testing a cloud storage interface proposed by an embodiment of this application;
  • Example 2 is a flowchart of a method for testing a cloud storage interface proposed in Example 1 of an embodiment of the application;
  • Example 3 is a flowchart of a method for testing a cloud storage interface proposed in Example 2 of an embodiment of the application;
  • Example 4 is a flowchart of a method for testing a cloud storage interface proposed in Example 3 of an embodiment of the application;
  • FIG. 5 is a schematic diagram of the structural composition of an apparatus for testing a cloud storage interface proposed in another embodiment of the application.
  • an embodiment of the present application proposes a method for testing a cloud storage interface, including:
  • Step 100 Configure test items; where the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of operations, the number of files to be operated, and the operation block size and file corresponding to each file Path and number of operations; among them, operations include any one or more of the following: read, write, and delete.
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size corresponding to each file, File path and number of reads;
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files written and written, and the write block size, file path, and number of writes corresponding to each file ;
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of deleted and deleted files, and the deleted block size, file path and number of deletions corresponding to each file ;
  • the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size and file path corresponding to each read file And the number of reads; the number of files written and written, and the write block size, file path, and number of writes corresponding to each file written;
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size and file path corresponding to each read file And the number of reads; the number of deleted and deleted files, and the deleted block size, file path, and number of deletions corresponding to each deleted file;
  • the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of deleted and deleted files, and the deleted block size and file path corresponding to each deleted file And the number of deletions; the number of files written and written, and the write block size, file path and number of writes corresponding to each written file;
  • the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read, and the number of files read, and the read block size corresponding to each read file, File path and read times; the number of files written and written, and the write block size, file path, and write times corresponding to each written file; the number of deleted and deleted files, and the deleted block size corresponding to each deleted file, File path and number of deletions.
  • the storage method may be a network file system (NFS, Network File System), a distributed file system (DFS, Distributed File System), a ZTE file system (ZXFS, ZTE File System), and the like. It depends on the cloud storage server.
  • NFS Network File System
  • DFS Distributed File System
  • ZXFS ZTE File System
  • test item is configured in a configuration file mode or the test item is configured in an interface configuration mode.
  • Step 101 Start N threads, and access the interface of the cloud storage server according to the storage mode of the configured cloud storage server and the address information of the cloud storage server through the N threads to open the i-th file corresponding to the configured i-th file path of the i-th file P i operations; the number of operations where, N is the number of threads configuration, i is an integer from 1 to M, M is the number of file configuration, P i corresponds to the i-th file configuration; The block size of the i-th file for each operation is the operation block size corresponding to the configured i-th file.
  • Step 102 Determine whether the cloud storage server meets a preset storage requirement according to the time of opening the i-th file and the time of each operation performed on the i-th file.
  • the storage requirements may include: file opening time, operation time;
  • storage requirements include: open file time, operation time, and any one or more of the following: average file open time, maximum file open time, minimum file open time, average operation time, maximum operation time, minimum operation time, and number of successes ,number of failures.
  • the cloud storage server can be regarded as meeting the storage requirements. If at least one cloud storage server does not meet the storage requirements, the cloud storage server does not meet the storage requirements.
  • the determining whether the cloud storage server meets a preset storage requirement according to the time of opening the i-th file and the time of each operation on the i-th file includes any one or more of the following:
  • the time for opening the i-th file is less than or equal to the time for opening the file in the storage requirement
  • the time for each operation on the i-th file is less than or equal to the operation time in the storage requirement
  • the average time for opening M files is less than or equal to the average time for opening files in the storage requirements
  • the maximum time for opening M files is less than or equal to the maximum time for opening files in the storage requirements
  • the minimum time for opening M files is less than or equal to the minimum time for opening files in the storage requirements
  • the average time for performing P operations on the i-th file is less than or equal to the average time for operations in the storage requirement
  • the maximum time for performing P operations on the i-th file is less than or equal to the maximum operation time in the storage requirement
  • the minimum time for performing P operations on the i-th file is less than or equal to the minimum operation time in the storage requirement
  • the number of successful operations is greater than or equal to the number of successful operations in the storage requirements
  • the number of operation failures is less than or equal to the number of failures in the storage requirements
  • the time for opening the i-th file is greater than the time for opening the file in the storage requirement
  • At least one operation time in the operation time of the i-th file is greater than the operation time in the storage requirement
  • the average time for opening M files is greater than the average time for opening files in the storage requirements
  • the maximum time for opening M files is greater than the maximum time for opening files in the storage requirements
  • the minimum time for opening M files is greater than the minimum time for opening files in the storage requirements
  • the average time for performing P operations on the i-th file is greater than the average time for operations in the storage requirement
  • the maximum time for performing P operations on the i-th file is greater than the maximum operation time in the storage requirement
  • the minimum time for performing P operations on the i-th file is greater than the minimum operation time in the storage requirement
  • the number of successful operations is less than the number of successful operations in the storage requirement
  • the number of operation failures is greater than the number of failures in the storage requirement.
  • the method further includes:
  • test result includes: whether the cloud storage server meets preset storage requirements, and any one or more of the following:
  • the time to open the i-th file The time to open the i-th file, the time to perform each operation on the i-th file, the average time to open M files, the maximum time to open M files, the minimum time to open M files, the The average time for P operations on a file, the maximum time for P operations on the i-th file, the minimum time for P operations on the i-th file, the number of successful operations, the number of failed operations, and disk space acquisition Size time, time to delete the i-th file, time to search the field in the i-th file.
  • test result is displayed in a file writing mode or the test result is displayed in an interface mode.
  • the cloud storage server is tested for reading, writing, and deleting files by configuring the test items, so as to test the performance of the cloud storage interface, thereby obtaining whether the cloud storage server corresponding to the cloud storage interface meets the storage requirements.
  • Including the storage mode of the cloud storage server and the address information of the cloud storage server, read and write tests on different cloud storage servers can be realized by modifying the storage mode of the cloud storage server and the address information of the cloud storage server.
  • Step 201 Start a thread according to the test item, and access the interface of the cloud storage server according to the storage mode of the cloud storage server and the address information of the cloud storage server through the thread, to open the file in the configured file path, and read from the file For three blocks, the size of the block read each time is the configured read block size.
  • Step 202 When the time to open the file is less than or equal to the file opening time in the storage requirements, and the time to read blocks from the file is less than or equal to the reading time in the storage requirements, determine that the cloud storage server meets the storage requirements; When the time of the file is greater than the opening time in the storage requirement, or the time to read the block from the file is greater than the reading time in the storage requirement at least once, it is determined that the cloud storage server does not meet the storage requirement.
  • Step 203 Display the test result; where the test result includes: the time to open the file, the time to perform each operation on the file, and whether the cloud storage server meets the preset storage requirements.
  • Step 301 Start two threads according to the test items, and access the interface of the cloud storage server according to the storage mode of the cloud storage server and the address information of the cloud storage server through these two threads, to open the file in the configured file path, from the file Read three blocks in the middle, and the size of the block read each time is the configured read block size.
  • Step 302 When the time to open the file is less than or equal to the file opening time in the storage requirement, and the time to read the block from the file is less than or equal to the reading time in the storage requirement, it is determined that the cloud storage server meets the storage requirement; When the time of the file is greater than the opening time in the storage requirement, or the time to read the block from the file is greater than the reading time in the storage requirement at least once, it is determined that the cloud storage server does not meet the storage requirement.
  • Step 303 Display the test results; where the test results include: the time to open the file, the time to perform each operation on the file, and whether the cloud storage server meets the preset storage requirements.
  • the multi-thread and multi-file read operation test is performed, as shown in Figure 4, including:
  • Step 401 Start 3 threads according to the test items, through these 3 threads, access the interface of the cloud storage server according to the storage mode of the cloud storage server and the address information of the cloud storage server to open the 2 files in the configured file path, from Three blocks are read in these two files, and the size of the block read each time is the configured read block size.
  • Step 402 When the average time for opening two files is less than or equal to the average time for opening files in the storage requirements, and the average time for reading blocks from the two files is less than or equal to the average time for reading in the storage requirements, determine the cloud The storage server meets the storage requirements; when the average time to open 2 files is greater than the average time to open files in the storage requirements, or the average time to read blocks from 2 files is greater than the average time to read in the storage requirements at least once, determine The cloud storage server does not meet the storage requirements.
  • Step 403 Display the test results; where the test results include: the average time to open two files, the average time to operate on the two files, and whether the cloud storage server meets the preset storage requirements.
  • Another embodiment of the present application provides a device for testing a cloud storage interface, including a processor and a computer-readable storage medium, the computer-readable storage medium stores instructions, and when the instructions are executed by the processor , To implement any of the above-mentioned methods for testing cloud storage interfaces.
  • Another embodiment of the present application 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 foregoing methods for testing a cloud storage interface are implemented.
  • FIG. 5 another embodiment of the present application proposes a device for testing cloud storage interfaces, including:
  • the configuration module 501 is used to configure test items; the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of operations, the number of operating files, and the operations corresponding to each file Block size, file path and number of operations; among them, operations include any one or more of the following: read, write, delete;
  • the test module 502 is used to start N threads, and access the interface of the cloud storage server through the N threads according to the storage mode of the configured cloud storage server and the address information of the cloud storage server, to open the configured i-th file path corresponding to the interface of the cloud storage server.
  • i files, i-th file P i operations wherein, N is the number of threads configuration, i is an integer from 1 to M, M is the number of file configuration, P i corresponds to the i-th file configuration
  • the number of operations; the block size of the i-th file for each operation is the operation block size corresponding to the i-th file configured;
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size corresponding to each file, File path and number of reads;
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files written and written, and the write block size, file path, and number of writes corresponding to each file ;
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of deleted and deleted files, and the deleted block size, file path and number of deletions corresponding to each file ;
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size and file path corresponding to each read file And the number of reads; the number of files written and written, and the write block size, file path and number of writes corresponding to each file written;
  • test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size and file path corresponding to each read file And the number of reads; the number of deleted and deleted files, and the deleted block size, file path, and number of deletions corresponding to each deleted file;
  • the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of deleted and deleted files, and the deleted block size and file path corresponding to each deleted file And the number of deletions; the number of files written and written, and the write block size, file path and number of writes corresponding to each written file;
  • the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read, and the number of files read, and the read block size corresponding to each read file, File path and read times; the number of files written and written, and the write block size, file path, and write times corresponding to each written file; the number of deleted and deleted files, and the deleted block size corresponding to each deleted file, File path and number of deletions.
  • the storage method may be a network file system (NFS, Network File System), a distributed file system (DFS, Distributed File System), a ZTE file system (ZXFS, ZTE File System), and the like. It depends on the cloud storage server.
  • NFS Network File System
  • DFS Distributed File System
  • ZXFS ZTE File System
  • the configuration module 501 configures the test item in a configuration file manner or configures the test item in an interface configuration manner.
  • the storage requirements may include: file opening time, operation time;
  • storage requirements include: open file time, operation time, and any one or more of the following: average file open time, maximum file open time, minimum file open time, average operation time, maximum operation time, minimum operation time, and number of successes ,number of failures.
  • the cloud storage server can be regarded as meeting the storage requirements.
  • the testing module 502 is specifically configured to use any one or more of the following methods to implement the determination of the cloud storage based on the time to open the i-th file and the time to perform each operation on the i-th file Whether the server meets the preset storage requirements:
  • the time for opening the i-th file is less than or equal to the time for opening the file in the storage requirement
  • the time for each operation on the i-th file is less than or equal to the operation time in the storage requirement
  • the average time for opening M files is less than or equal to the average time for opening files in the storage requirements
  • the maximum time for opening M files is less than or equal to the maximum time for opening files in the storage requirements
  • the minimum time for opening M files is less than or equal to the minimum time for opening files in the storage requirements
  • the average time for performing P operations on the i-th file is less than or equal to the average time for operations in the storage requirement
  • the maximum time for performing P operations on the i-th file is less than or equal to the maximum operation time in the storage requirement
  • the minimum time for performing P operations on the i-th file is less than or equal to the minimum operation time in the storage requirement
  • the number of successful operations is greater than or equal to the number of successful operations in the storage requirements
  • the number of operation failures is less than or equal to the number of failures in the storage requirements
  • the time for opening the i-th file is greater than the time for opening the file in the storage requirement
  • At least one operation time in the operation time of the i-th file is greater than the operation time in the storage requirement
  • the average time for opening M files is greater than the average time for opening files in the storage requirements
  • the maximum time for opening M files is greater than the maximum time for opening files in the storage requirements
  • the minimum time for opening M files is greater than the minimum time for opening files in the storage requirements
  • the average time for performing P operations on the i-th file is greater than the average time for operations in the storage requirement
  • the maximum time for performing P operations on the i-th file is greater than the maximum operation time in the storage requirement
  • the minimum time for performing P operations on the i-th file is greater than the minimum operation time in the storage requirement
  • the number of successful operations is less than the number of successful operations in the storage requirement
  • the number of operation failures is greater than the number of failures in the storage requirement.
  • the result display module 503 is used to display the test result
  • test result includes: whether the cloud storage server meets preset storage requirements, and any one or more of the following:
  • the time to open the i-th file The time to open the i-th file, the time to perform each operation on the i-th file, the average time to open M files, the maximum time to open M files, the minimum time to open M files, the The average time for P operations on a file, the maximum time for P operations on the i-th file, the minimum time for P operations on the i-th file, the number of successful operations, the number of failed operations, and disk space acquisition Size time, time to delete the i-th file, time to search the field in the i-th file.
  • the result display module 503 displays the test result in a file-writing manner or displays the test result in an interface manner.
  • the configuration module 501 and the test module 502, and the test module 502 and the result display module 503 can communicate in a message queue, or Socket, or shared memory, etc., of course, can also communicate in other ways.
  • the embodiment of the present application does not limit the communication mode between the configuration module 501 and the test module 502, and between the test module 502 and the result display module 503.
  • the embodiment of the application performs a file read and write test on the cloud storage server by configuring the test items to test the performance of the cloud storage interface, thereby obtaining whether the cloud storage server corresponding to the cloud storage interface meets the storage requirements, because the test items include The storage mode of the cloud storage server and the address information of the cloud storage server are modified. Read and write tests on different cloud storage servers can be realized by modifying the storage mode of the cloud storage server and the address information of the cloud storage server.
  • Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium).
  • the term computer storage medium includes volatile and non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Sexual, removable and non-removable media.
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or Any other medium used to store desired information and that can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media. .

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

A cloud storage interface test method and apparatus. Said method comprises: configuring test items, the test items including a storage mode of a cloud storage server, address information of the cloud storage server, the number N of threads, an operation, the number M of files to be operated, the operation block size and file path corresponding to each file, and the number Pi of times of operation corresponding to each file, the operation including any one or more of read, write, and deletion (100); starting N threads, and accessing an interface of the cloud storage server by means of the N threads according to the configured storage mode of the cloud storage server and address information of the cloud storage server, so as to open an ith file corresponding to the configured ith file path, and perform Pi times of operation on the ith file (101); and according to the time of opening the ith file and the time of performing each operation on the ith file, determining whether the cloud storage server satisfies a predetermined storage requirement (102).

Description

一种测试云存储接口的方法和装置Method and device for testing cloud storage interface
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为201910894317.7、申请日为2019年9月20日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is filed based on a Chinese patent application with an application number of 201910894317.7 and an application date of September 20, 2019, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by way of introduction.
技术领域Technical field
本申请实施例涉及但不限于测试领域,尤指一种测试云存储接口的方法和装置。The embodiments of the present application relate to, but are not limited to, the field of testing, and particularly refer to a method and device for testing cloud storage interfaces.
背景技术Background technique
安防系统,目前已经成为生活中比不可少的一部分。无论是居住社区、道路监控、还是更高要求的智能安防等,都已经普遍应用于生活。The security system has now become an indispensable part of life. Whether it is residential communities, road monitoring, or more demanding intelligent security, etc., it has been widely used in life.
随着互联网的发展,安防媒体存储方式已由磁盘存储,向云存储方向发展。目前云存储厂家很多,存储性能以及问题都是五花八门,所以安防媒体服务器对接第三方云存储困难重重,无法获知哪一个云存储厂家的云存储服务器能够满足安防媒体服务器的存储要求。With the development of the Internet, security media storage methods have evolved from disk storage to cloud storage. At present, there are many cloud storage vendors, and storage performance and problems are varied. Therefore, it is difficult for security media servers to connect to third-party cloud storage. It is impossible to know which cloud storage server of cloud storage vendors can meet the storage requirements of security media servers.
发明内容Summary of the invention
本申请实施例提供了一种测试云存储接口的方法和装置。The embodiments of the present application provide a method and device for testing a cloud storage interface.
本申请实施例提供了一种测试云存储接口的方法,包括:配置测试项;其中,所述测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、操作、操作的文件数目、以及每一个文件对应的操作块大小、文件路径和操作次数;其中,操作包括以下任意一个或多个:读、写、删;启动N个线程,通过N个线程根据配置的云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的第i个文件路径对 应的第i个文件,对第i个文件进行P i次操作;其中,N为配置的线程数目,i为1到M的整数,M为配置的文件数目,P i为配置的第i个文件对应的操作次数;每一次操作第i个文件的块大小为配置的第i个文件对应的操作块大小;根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求。 The embodiment of the application provides a method for testing a cloud storage interface, including: configuring a test item; wherein the test item includes: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the operation, and the operation The number of files, as well as the operation block size, file path, and operation times corresponding to each file; among them, the operations include any one or more of the following: read, write, delete; start N threads, through N threads according to the configured cloud storage The storage mode of the server and the address information of the cloud storage server access the interface of the cloud storage server to open the i-th file corresponding to the configured i-th file path, and perform P i operations on the i-th file; where N is the configuration The number of threads, i is an integer from 1 to M, M is the number of configured files, P i is the number of operations corresponding to the configured i-th file; the block size of each i-th file is the configured i-th file Corresponding operation block size; determining whether the cloud storage server meets the preset storage requirements according to the time to open the i-th file and the time to perform each operation on the i-th file.
本申请实施例提供了一种测试云存储接口的装置,包括处理器和计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令被所述处理器执行时,实现上述任一种测试云存储接口的方法。An embodiment of the application provides a device for testing a cloud storage interface, including a processor and a computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are executed by the processor, Any of the above methods for testing cloud storage interfaces.
本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种测试云存储接口的方法的步骤。The embodiment of the present application 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 foregoing methods for testing a cloud storage interface are implemented.
本申请实施例提供了一种测试云存储接口的装置,包括:配置模块,用于配置测试项;其中,所述测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、操作、操作的文件数目、以及每一个文件对应的操作块大小、文件路径和操作次数;其中,操作包括以下任意一个或多个:读、写、删;测试模块,用于启动N个线程,通过N个线程根据配置的云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的第i个文件路径对应的第i个文件,对第i个文件进行P i次操作;其中,N为配置的线程数目,i为1到M的整数,M为配置的文件数目,P i为配置的第i个文件对应的操作次数;每一次操作第i个文件的块大小为配置的第i个文件对应的操作块大小;根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求。 The embodiment of the present application provides a device for testing a cloud storage interface, including: a configuration module for configuring test items; wherein the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, and the number of threads , Operation, the number of files to be operated, and the corresponding operation block size, file path and operation times of each file; among them, the operation includes any one or more of the following: read, write, delete; test module, used to start N threads , Through N threads to access the interface of the cloud storage server according to the storage mode of the configured cloud storage server and the address information of the cloud storage server, to open the i-th file corresponding to the configured i-th file path, and perform processing on the i-th file P i operations; where N is the number of threads configured, i is an integer from 1 to M, M is the number of files configured, and P i is the number of operations corresponding to the i-th file configured; each operation of the i-th file The block size of is the operation block size corresponding to the configured i-th file; according to the time of opening the i-th file and the time of each operation on the i-th file, it is determined whether the cloud storage server meets the preset storage requirements.
本申请实施例的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请实施例而了解。本申请实施例的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the embodiments of the present application will be described in the following description, and partly become obvious from the description, or can be understood by implementing the embodiments of the present application. The purpose and other advantages of the embodiments of the present application can be realized and obtained through the structures specifically pointed out in the specification, claims and drawings.
附图说明Description of the drawings
附图用来提供对本申请实施例技术方案的进一步理解,并且构成说明书的一部分,与本申请实施例的实施例一起用于解释本申请实施例的技术方案,并不构成对本申请实施例技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solutions of the embodiments of the application, and constitute a part of the specification. Together with the embodiments of the embodiments of the application, they are used to explain the technical solutions of the embodiments of the application, and do not constitute a technical solution to the embodiments of the application. limits.
图1为本申请一个实施例提出的测试云存储接口的方法的流程图;FIG. 1 is a flowchart of a method for testing a cloud storage interface proposed by an embodiment of this application;
图2为本申请实施例的实例1提出的测试云存储接口的方法的流程图;2 is a flowchart of a method for testing a cloud storage interface proposed in Example 1 of an embodiment of the application;
图3为本申请实施例的实例2提出的测试云存储接口的方法的流程图;3 is a flowchart of a method for testing a cloud storage interface proposed in Example 2 of an embodiment of the application;
图4为本申请实施例的实例3提出的测试云存储接口的方法的流程图;4 is a flowchart of a method for testing a cloud storage interface proposed in Example 3 of an embodiment of the application;
图5为本申请另一个实施例提出的测试云存储接口的装置的结构组成示意图。FIG. 5 is a schematic diagram of the structural composition of an apparatus for testing a cloud storage interface proposed in another embodiment of the application.
具体实施方式detailed description
下文中将结合附图对本申请实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Hereinafter, the embodiments of the present application will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily if there is no conflict.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps shown in the flowcharts of the drawings can be executed in a computer system such as a set of computer-executable instructions. And, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here.
参见图1,本申请一个实施例提出了一种测试云存储接口的方法,包括:Referring to Fig. 1, an embodiment of the present application proposes a method for testing a cloud storage interface, including:
步骤100、配置测试项;其中,所述测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、操作、操作的文件数目、以及每一个文件对应的操作块大小、文件路径和操作次数;其中,操作包括以下任意一个或多个:读、写、删。 Step 100. Configure test items; where the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of operations, the number of files to be operated, and the operation block size and file corresponding to each file Path and number of operations; among them, operations include any one or more of the following: read, write, and delete.
需要说明的是,当操作仅包括读时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、读、读的文件数目、以及每一个文件对应的读块大小、文件路径和读次数;It should be noted that when the operation only includes reading, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size corresponding to each file, File path and number of reads;
当操作仅包括写时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、写、写的文件数目、以及每一个文件对应的写块大小、文件路径和写次数;When the operation only includes writing, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files written and written, and the write block size, file path, and number of writes corresponding to each file ;
当操作仅包括删时,测试项包括:云存储服务器的存储方式、云存储服 务器的地址信息、线程数目、删、删的文件数目、以及每一个文件对应的删块大小、文件路径和删次数;When the operation only includes deletion, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of deleted and deleted files, and the deleted block size, file path and number of deletions corresponding to each file ;
当操作包括读和写时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、读、读的文件数目、以及每一个读的文件对应的读块大小、文件路径和读次数;写、写的文件数目、以及每一个写的文件对应的写块大小、文件路径和写次数;When the operation includes reading and writing, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size and file path corresponding to each read file And the number of reads; the number of files written and written, and the write block size, file path, and number of writes corresponding to each file written;
当操作包括读和删时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、读、读的文件数目、以及每一个读的文件对应的读块大小、文件路径和读次数;删、删的文件数目、以及每一个删的文件对应的删块大小、文件路径和删次数;When the operation includes read and delete, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size and file path corresponding to each read file And the number of reads; the number of deleted and deleted files, and the deleted block size, file path, and number of deletions corresponding to each deleted file;
当操作包括删和写时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、删、删的文件数目、以及每一个删的文件对应的删块大小、文件路径和删次数;写、写的文件数目、以及每一个写的文件对应的写块大小、文件路径和写次数;When the operation includes deletion and writing, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of deleted and deleted files, and the deleted block size and file path corresponding to each deleted file And the number of deletions; the number of files written and written, and the write block size, file path and number of writes corresponding to each written file;
当操作包括读、写和删时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、读、读的文件数目、以及每一个读的文件对应的读块大小、文件路径和读次数;写、写的文件数目、以及每一个写的文件对应的写块大小、文件路径和写次数;删、删的文件数目、以及每一个删的文件对应的删块大小、文件路径和删次数。When the operation includes reading, writing, and deleting, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read, and the number of files read, and the read block size corresponding to each read file, File path and read times; the number of files written and written, and the write block size, file path, and write times corresponding to each written file; the number of deleted and deleted files, and the deleted block size corresponding to each deleted file, File path and number of deletions.
在一个示例性实例中,存储方式可以是网络文件系统(NFS,Network File System)、分布式文件系统(DFS,Distributed File System)、中兴文件系统(ZXFS,ZTE File System)等。具体视云存储服务器而言。In an exemplary embodiment, the storage method may be a network file system (NFS, Network File System), a distributed file system (DFS, Distributed File System), a ZTE file system (ZXFS, ZTE File System), and the like. It depends on the cloud storage server.
在一个示例性实例中,以配置文件方式配置所述测试项或以界面配置方式配置所述测试项。In an exemplary embodiment, the test item is configured in a configuration file mode or the test item is configured in an interface configuration mode.
步骤101、启动N个线程,通过N个线程根据配置的云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的第i个文件路径对应的第i个文件,对第i个文件进行P i次操作;其中,N为配置的线程数目,i为1到M的整数,M为配置的文件数目,P i为配置的第i个文件对应的操作次数;每一次操作第i个文件的块大小为配置的第i个文件 对应的操作块大小。 Step 101: Start N threads, and access the interface of the cloud storage server according to the storage mode of the configured cloud storage server and the address information of the cloud storage server through the N threads to open the i-th file corresponding to the configured i-th file path of the i-th file P i operations; the number of operations where, N is the number of threads configuration, i is an integer from 1 to M, M is the number of file configuration, P i corresponds to the i-th file configuration; The block size of the i-th file for each operation is the operation block size corresponding to the configured i-th file.
步骤102、根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求。Step 102: Determine whether the cloud storage server meets a preset storage requirement according to the time of opening the i-th file and the time of each operation performed on the i-th file.
在一个示例性实例中,存储要求可以包括:打开文件时间、操作时间;In an illustrative example, the storage requirements may include: file opening time, operation time;
或者,存储要求包括:打开文件时间、操作时间、以及以下任意一个或多个:打开文件平均时间、打开文件最大时间、打开文件最小时间、操作平均时间、操作最大时间、操作最小时间、成功次数、失败次数。Or, storage requirements include: open file time, operation time, and any one or more of the following: average file open time, maximum file open time, minimum file open time, average operation time, maximum operation time, minimum operation time, and number of successes ,number of failures.
需要说明的是,只要存储要求中有的云存储服务器都要满足才能算是云存储服务器满足存储要求,存储要求中至少有一个云存储服务器不满足则云存储服务器不满足存储要求。It should be noted that as long as some cloud storage servers in the storage requirements are met, the cloud storage server can be regarded as meeting the storage requirements. If at least one cloud storage server does not meet the storage requirements, the cloud storage server does not meet the storage requirements.
在一个示例性实例中,所述根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求包括以下任意一个或多个:In an exemplary embodiment, the determining whether the cloud storage server meets a preset storage requirement according to the time of opening the i-th file and the time of each operation on the i-th file includes any one or more of the following:
当满足以下任意一个或多个时,确定所述云存储服务器满足所述存储要求:When any one or more of the following is met, it is determined that the cloud storage server meets the storage requirement:
打开所述第i个文件的时间小于或等于所述存储要求中的打开文件时间;The time for opening the i-th file is less than or equal to the time for opening the file in the storage requirement;
对所述第i个文件进行每一次操作的时间均小于或等于所述存储要求中的操作时间;The time for each operation on the i-th file is less than or equal to the operation time in the storage requirement;
打开M个文件的平均时间小于或等于所述存储要求中的打开文件平均时间;The average time for opening M files is less than or equal to the average time for opening files in the storage requirements;
打开M个文件的最大时间小于或等于所述存储要求中的打开文件最大时间;The maximum time for opening M files is less than or equal to the maximum time for opening files in the storage requirements;
打开M个文件的最小时间小于或等于所述存储要求中的打开文件最小时间;The minimum time for opening M files is less than or equal to the minimum time for opening files in the storage requirements;
对所述第i个文件进行P次操作的平均时间小于或等于所述存储要求中的操作平均时间;The average time for performing P operations on the i-th file is less than or equal to the average time for operations in the storage requirement;
对所述第i个文件进行P次操作的最大时间小于或等于所述存储要求中的 操作最大时间;The maximum time for performing P operations on the i-th file is less than or equal to the maximum operation time in the storage requirement;
对所述第i个文件进行P次操作的最小时间小于或等于所述存储要求中的操作最小时间;The minimum time for performing P operations on the i-th file is less than or equal to the minimum operation time in the storage requirement;
操作成功次数大于或等于所述存储要求中的成功次数;The number of successful operations is greater than or equal to the number of successful operations in the storage requirements;
操作失败次数小于或等于所述存储要求中的失败次数;The number of operation failures is less than or equal to the number of failures in the storage requirements;
当满足以下任意一个或多个时,确定所述云存储服务器不满足所述存储要求:When any one or more of the following are met, it is determined that the cloud storage server does not meet the storage requirements:
打开所述第i个文件的时间大于所述存储要求中的打开文件时间;The time for opening the i-th file is greater than the time for opening the file in the storage requirement;
对所述第i个文件进行操作的时间中至少有一次操作的时间大于所述存储要求中的操作时间;At least one operation time in the operation time of the i-th file is greater than the operation time in the storage requirement;
打开M个文件的平均时间大于所述存储要求中的打开文件平均时间;The average time for opening M files is greater than the average time for opening files in the storage requirements;
打开M个文件的最大时间大于所述存储要求中的打开文件最大时间;The maximum time for opening M files is greater than the maximum time for opening files in the storage requirements;
打开M个文件的最小时间大于所述存储要求中的打开文件最小时间;The minimum time for opening M files is greater than the minimum time for opening files in the storage requirements;
对所述第i个文件进行P次操作的平均时间大于所述存储要求中的操作平均时间;The average time for performing P operations on the i-th file is greater than the average time for operations in the storage requirement;
对所述第i个文件进行P次操作的最大时间大于所述存储要求中的操作最大时间;The maximum time for performing P operations on the i-th file is greater than the maximum operation time in the storage requirement;
对所述第i个文件进行P次操作的最小时间大于所述存储要求中的操作最小时间;The minimum time for performing P operations on the i-th file is greater than the minimum operation time in the storage requirement;
操作成功次数小于所述存储要求中的成功次数;The number of successful operations is less than the number of successful operations in the storage requirement;
操作失败次数大于所述存储要求中的失败次数。The number of operation failures is greater than the number of failures in the storage requirement.
在本申请另一个实施例中,该方法还包括:In another embodiment of the present application, the method further includes:
展示测试结果;Show test results;
其中,所述测试结果包括:所述云存储服务器是否满足预先设置的存储要求,以及以下任意一个或多个:Wherein, the test result includes: whether the cloud storage server meets preset storage requirements, and any one or more of the following:
打开第i个文件的时间、对第i个文件进行每一次操作的时间、打开M个 文件的平均时间、打开M个文件的最大时间、打开M个文件的最小时间、对所述第i个文件进行P次操作的平均时间、对所述第i个文件进行P次操作的最大时间、对所述第i个文件进行P次操作的最小时间、操作成功次数、操作失败次数、获取磁盘空间大小时间、删除第i个文件的时间、在第i个文件中搜索字段的时间。The time to open the i-th file, the time to perform each operation on the i-th file, the average time to open M files, the maximum time to open M files, the minimum time to open M files, the The average time for P operations on a file, the maximum time for P operations on the i-th file, the minimum time for P operations on the i-th file, the number of successful operations, the number of failed operations, and disk space acquisition Size time, time to delete the i-th file, time to search the field in the i-th file.
在一个示例性实例中,以写文件方式展示所述测试结果或以界面方式展示所述测试结果。In an exemplary example, the test result is displayed in a file writing mode or the test result is displayed in an interface mode.
本申请实施例通过配置测试项对云存储服务器进行读写删文件测试,实现了对云存储接口的性能的测试,从而获得了云存储接口对应的云存储服务器是否满足存储要求,由于测试项中包括了云存储服务器的存储方式、云存储服务器的地址信息,通过修改云存储服务器的存储方式、云存储服务器的地址信息即可实现对不同云存储服务器的读写测试。In the embodiment of the application, the cloud storage server is tested for reading, writing, and deleting files by configuring the test items, so as to test the performance of the cloud storage interface, thereby obtaining whether the cloud storage server corresponding to the cloud storage interface meets the storage requirements. Including the storage mode of the cloud storage server and the address information of the cloud storage server, read and write tests on different cloud storage servers can be realized by modifying the storage mode of the cloud storage server and the address information of the cloud storage server.
实例1Example 1
本实例中进行单线程单文件的读操作测试,如图2所示,包括:In this example, a single-threaded single-file read operation test is performed, as shown in Figure 2, including:
步骤200、配置测试项;其中,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目N=1、读、读的文件数目M=1、以及每一个文件对应的读块大小、文件路径和读次数P=3。Step 200: Configure test items; where the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads N=1, the number of files read and read M=1, and the corresponding read of each file Block size, file path, and number of reads P=3.
步骤201、按照测试项启动一个线程,通过该线程根据云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的文件路径中的文件,从该文件中读取三个块,每一次读的块的大小为配置的读块大小。Step 201: Start a thread according to the test item, and access the interface of the cloud storage server according to the storage mode of the cloud storage server and the address information of the cloud storage server through the thread, to open the file in the configured file path, and read from the file For three blocks, the size of the block read each time is the configured read block size.
步骤202、当打开文件的时间小于或等于存储要求中的打开文件时间,且从文件中读取块的时间均小于或等于存储要求中的读时间时,确定云存储服务器满足存储要求;当打开文件的时间大于存储要求中的打开文件时间,或从文件中读取块的时间至少有一次大于存储要求中的读时间时,确定云存储服务器不满足存储要求。Step 202: When the time to open the file is less than or equal to the file opening time in the storage requirements, and the time to read blocks from the file is less than or equal to the reading time in the storage requirements, determine that the cloud storage server meets the storage requirements; When the time of the file is greater than the opening time in the storage requirement, or the time to read the block from the file is greater than the reading time in the storage requirement at least once, it is determined that the cloud storage server does not meet the storage requirement.
步骤203、展示测试结果;其中,测试结果包括:打开文件的时间、对文件进行每一次操作的时间、云存储服务器是否满足预先设置的存储要求。Step 203: Display the test result; where the test result includes: the time to open the file, the time to perform each operation on the file, and whether the cloud storage server meets the preset storage requirements.
实例2Example 2
本实例中进行多线程单文件的读操作测试,如图3所示,包括:In this example, a multi-threaded single file read operation test is performed, as shown in Figure 3, including:
步骤300、配置测试项;其中,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目N=2、读、读的文件数目M=1、以及每一个文件对应的读块大小、文件路径和读次数P=3。Step 300: Configure test items; where the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads N=2, the number of files read, and the number of files read M=1, and the read corresponding to each file Block size, file path, and number of reads P=3.
步骤301、按照测试项启动2个线程,通过这2个线程根据云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的文件路径中的文件,从该文件中读取三个块,每一次读的块的大小为配置的读块大小。 Step 301. Start two threads according to the test items, and access the interface of the cloud storage server according to the storage mode of the cloud storage server and the address information of the cloud storage server through these two threads, to open the file in the configured file path, from the file Read three blocks in the middle, and the size of the block read each time is the configured read block size.
步骤302、当打开文件的时间小于或等于存储要求中的打开文件时间,且从文件中读取块的时间均小于或等于存储要求中的读时间时,确定云存储服务器满足存储要求;当打开文件的时间大于存储要求中的打开文件时间,或从文件中读取块的时间至少有一次大于存储要求中的读时间时,确定云存储服务器不满足存储要求。Step 302: When the time to open the file is less than or equal to the file opening time in the storage requirement, and the time to read the block from the file is less than or equal to the reading time in the storage requirement, it is determined that the cloud storage server meets the storage requirement; When the time of the file is greater than the opening time in the storage requirement, or the time to read the block from the file is greater than the reading time in the storage requirement at least once, it is determined that the cloud storage server does not meet the storage requirement.
步骤303、展示测试结果;其中,测试结果包括:打开文件的时间、对文件进行每一次操作的时间、云存储服务器是否满足预先设置的存储要求。Step 303: Display the test results; where the test results include: the time to open the file, the time to perform each operation on the file, and whether the cloud storage server meets the preset storage requirements.
实例3Example 3
本实例中进行多线程多文件的读操作测试,如图4所示,包括:In this example, the multi-thread and multi-file read operation test is performed, as shown in Figure 4, including:
步骤400、配置测试项;其中,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目N=3、读、读的文件数目M=2、以及每一个文件对应的读块大小、文件路径和读次数P=3。Step 400: Configure test items; where the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads N=3, the number of files read and read M=2, and the read corresponding to each file Block size, file path, and number of reads P=3.
步骤401、按照测试项启动3个线程,通过这3个线程根据云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的文件路径中的2个文件,从这2个文件中分别读取三个块,每一次读的块的大小为配置的读块大小。Step 401: Start 3 threads according to the test items, through these 3 threads, access the interface of the cloud storage server according to the storage mode of the cloud storage server and the address information of the cloud storage server to open the 2 files in the configured file path, from Three blocks are read in these two files, and the size of the block read each time is the configured read block size.
步骤402、当打开2个文件的平均时间小于或等于存储要求中的打开文件平均时间,且从2个文件中读取块的平均时间均小于或等于存储要求中的读平均时间时,确定云存储服务器满足存储要求;当打开2个文件的平均时间 大于存储要求中的打开文件平均时间,或从2个文件中读取块的平均时间至少有一次大于存储要求中的读平均时间时,确定云存储服务器不满足存储要求。Step 402: When the average time for opening two files is less than or equal to the average time for opening files in the storage requirements, and the average time for reading blocks from the two files is less than or equal to the average time for reading in the storage requirements, determine the cloud The storage server meets the storage requirements; when the average time to open 2 files is greater than the average time to open files in the storage requirements, or the average time to read blocks from 2 files is greater than the average time to read in the storage requirements at least once, determine The cloud storage server does not meet the storage requirements.
步骤403、展示测试结果;其中,测试结果包括:打开2个文件的平均时间、对2个文件进行操作的平均时间、云存储服务器是否满足预先设置的存储要求。Step 403: Display the test results; where the test results include: the average time to open two files, the average time to operate on the two files, and whether the cloud storage server meets the preset storage requirements.
本申请另一个实施例提出了一种测试云存储接口的装置,包括处理器和计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令被所述处理器执行时,实现上述任一种测试云存储接口的方法。Another embodiment of the present application provides a device for testing a cloud storage interface, including a processor and a computer-readable storage medium, the computer-readable storage medium stores instructions, and when the instructions are executed by the processor , To implement any of the above-mentioned methods for testing cloud storage interfaces.
本申请另一个实施例提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种测试云存储接口的方法的步骤。Another embodiment of the present application 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 foregoing methods for testing a cloud storage interface are implemented.
参见图5,本申请另一个实施例提出了一种测试云存储接口的装置,包括:Referring to FIG. 5, another embodiment of the present application proposes a device for testing cloud storage interfaces, including:
配置模块501,用于配置测试项;其中,所述测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、操作、操的作文件数目、以及每一个文件对应的操作块大小、文件路径和操作次数;其中,操作包括以下任意一个或多个:读、写、删;The configuration module 501 is used to configure test items; the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of operations, the number of operating files, and the operations corresponding to each file Block size, file path and number of operations; among them, operations include any one or more of the following: read, write, delete;
测试模块502,用于启动N个线程,通过N个线程根据配置的云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的第i个文件路径对应的第i个文件,对第i个文件进行P i次操作;其中,N为配置的线程数目,i为1到M的整数,M为配置的文件数目,P i为配置的第i个文件对应的操作次数;每一次操作第i个文件的块大小为配置的第i个文件对应的操作块大小; The test module 502 is used to start N threads, and access the interface of the cloud storage server through the N threads according to the storage mode of the configured cloud storage server and the address information of the cloud storage server, to open the configured i-th file path corresponding to the interface of the cloud storage server. i files, i-th file P i operations; wherein, N is the number of threads configuration, i is an integer from 1 to M, M is the number of file configuration, P i corresponds to the i-th file configuration The number of operations; the block size of the i-th file for each operation is the operation block size corresponding to the i-th file configured;
根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求。Determine whether the cloud storage server meets the preset storage requirement according to the time of opening the i-th file and the time of each operation performed on the i-th file.
需要说明的是,当操作仅包括读时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、读、读的文件数目、以及每一个文件对应的读块大小、文件路径和读次数;It should be noted that when the operation only includes reading, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size corresponding to each file, File path and number of reads;
当操作仅包括写时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、写、写的文件数目、以及每一个文件对应的写块大小、文件路径和写次数;When the operation only includes writing, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files written and written, and the write block size, file path, and number of writes corresponding to each file ;
当操作仅包括删时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、删、删的文件数目、以及每一个文件对应的删块大小、文件路径和删次数;When the operation only includes deletion, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of deleted and deleted files, and the deleted block size, file path and number of deletions corresponding to each file ;
当操作包括读和写时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、读、读的文件数目、以及每一个读的文件对应的读块大小、文件路径和读次数;写、写的文件数目、以及每一个写的文件对应的写块大小、文件路径和写次数;When the operation includes reading and writing, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size and file path corresponding to each read file And the number of reads; the number of files written and written, and the write block size, file path and number of writes corresponding to each file written;
当操作包括读和删时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、读、读的文件数目、以及每一个读的文件对应的读块大小、文件路径和读次数;删、删的文件数目、以及每一个删的文件对应的删块大小、文件路径和删次数;When the operation includes read and delete, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read and read, and the read block size and file path corresponding to each read file And the number of reads; the number of deleted and deleted files, and the deleted block size, file path, and number of deletions corresponding to each deleted file;
当操作包括删和写时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、删、删的文件数目、以及每一个删的文件对应的删块大小、文件路径和删次数;写、写的文件数目、以及每一个写的文件对应的写块大小、文件路径和写次数;When the operation includes deletion and writing, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of deleted and deleted files, and the deleted block size and file path corresponding to each deleted file And the number of deletions; the number of files written and written, and the write block size, file path and number of writes corresponding to each written file;
当操作包括读、写和删时,测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、读、读的文件数目、以及每一个读的文件对应的读块大小、文件路径和读次数;写、写的文件数目、以及每一个写的文件对应的写块大小、文件路径和写次数;删、删的文件数目、以及每一个删的文件对应的删块大小、文件路径和删次数。When the operation includes reading, writing, and deleting, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of files read, and the number of files read, and the read block size corresponding to each read file, File path and read times; the number of files written and written, and the write block size, file path, and write times corresponding to each written file; the number of deleted and deleted files, and the deleted block size corresponding to each deleted file, File path and number of deletions.
在一个示例性实例中,存储方式可以是网络文件系统(NFS,Network File System)、分布式文件系统(DFS,Distributed File System)、中兴文件系统(ZXFS,ZTE File System)等。具体视云存储服务器而言。In an exemplary embodiment, the storage method may be a network file system (NFS, Network File System), a distributed file system (DFS, Distributed File System), a ZTE file system (ZXFS, ZTE File System), and the like. It depends on the cloud storage server.
在一个示例性实例中,配置模块501以配置文件方式配置所述测试项或以界面配置方式配置所述测试项。In an exemplary embodiment, the configuration module 501 configures the test item in a configuration file manner or configures the test item in an interface configuration manner.
在一个示例性实例中,存储要求可以包括:打开文件时间、操作时间;In an illustrative example, the storage requirements may include: file opening time, operation time;
或者,存储要求包括:打开文件时间、操作时间、以及以下任意一个或多个:打开文件平均时间、打开文件最大时间、打开文件最小时间、操作平均时间、操作最大时间、操作最小时间、成功次数、失败次数。Or, storage requirements include: open file time, operation time, and any one or more of the following: average file open time, maximum file open time, minimum file open time, average operation time, maximum operation time, minimum operation time, and number of successes ,number of failures.
需要说明的是,只要存储要求中有的云存储服务器都要满足才能算是云存储服务器满足存储要求。It should be noted that as long as some cloud storage servers in the storage requirements must be met, the cloud storage server can be regarded as meeting the storage requirements.
在一个示例性实例中,测试模块502具体用于采用以下任意一种或多种方式实现所述根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求:In an exemplary embodiment, the testing module 502 is specifically configured to use any one or more of the following methods to implement the determination of the cloud storage based on the time to open the i-th file and the time to perform each operation on the i-th file Whether the server meets the preset storage requirements:
当满足以下任意一个或多个时,确定所述云存储服务器满足所述存储要求:When any one or more of the following is met, it is determined that the cloud storage server meets the storage requirement:
打开所述第i个文件的时间小于或等于所述存储要求中的打开文件时间;The time for opening the i-th file is less than or equal to the time for opening the file in the storage requirement;
对所述第i个文件进行每一次操作的时间均小于或等于所述存储要求中的操作时间;The time for each operation on the i-th file is less than or equal to the operation time in the storage requirement;
打开M个文件的平均时间小于或等于所述存储要求中的打开文件平均时间;The average time for opening M files is less than or equal to the average time for opening files in the storage requirements;
打开M个文件的最大时间小于或等于所述存储要求中的打开文件最大时间;The maximum time for opening M files is less than or equal to the maximum time for opening files in the storage requirements;
打开M个文件的最小时间小于或等于所述存储要求中的打开文件最小时间;The minimum time for opening M files is less than or equal to the minimum time for opening files in the storage requirements;
对所述第i个文件进行P次操作的平均时间小于或等于所述存储要求中的操作平均时间;The average time for performing P operations on the i-th file is less than or equal to the average time for operations in the storage requirement;
对所述第i个文件进行P次操作的最大时间小于或等于所述存储要求中的操作最大时间;The maximum time for performing P operations on the i-th file is less than or equal to the maximum operation time in the storage requirement;
对所述第i个文件进行P次操作的最小时间小于或等于所述存储要求中的操作最小时间;The minimum time for performing P operations on the i-th file is less than or equal to the minimum operation time in the storage requirement;
操作成功次数大于或等于所述存储要求中的成功次数;The number of successful operations is greater than or equal to the number of successful operations in the storage requirements;
操作失败次数小于或等于所述存储要求中的失败次数;The number of operation failures is less than or equal to the number of failures in the storage requirements;
当满足以下任意一个或多个时,确定所述云存储服务器不满足所述存储要求:When any one or more of the following are met, it is determined that the cloud storage server does not meet the storage requirements:
打开所述第i个文件的时间大于所述存储要求中的打开文件时间;The time for opening the i-th file is greater than the time for opening the file in the storage requirement;
对所述第i个文件进行操作的时间中至少有一次操作的时间大于所述存储要求中的操作时间;At least one operation time in the operation time of the i-th file is greater than the operation time in the storage requirement;
打开M个文件的平均时间大于所述存储要求中的打开文件平均时间;The average time for opening M files is greater than the average time for opening files in the storage requirements;
打开M个文件的最大时间大于所述存储要求中的打开文件最大时间;The maximum time for opening M files is greater than the maximum time for opening files in the storage requirements;
打开M个文件的最小时间大于所述存储要求中的打开文件最小时间;The minimum time for opening M files is greater than the minimum time for opening files in the storage requirements;
对所述第i个文件进行P次操作的平均时间大于所述存储要求中的操作平均时间;The average time for performing P operations on the i-th file is greater than the average time for operations in the storage requirement;
对所述第i个文件进行P次操作的最大时间大于所述存储要求中的操作最大时间;The maximum time for performing P operations on the i-th file is greater than the maximum operation time in the storage requirement;
对所述第i个文件进行P次操作的最小时间大于所述存储要求中的操作最小时间;The minimum time for performing P operations on the i-th file is greater than the minimum operation time in the storage requirement;
操作成功次数小于所述存储要求中的成功次数;The number of successful operations is less than the number of successful operations in the storage requirement;
操作失败次数大于所述存储要求中的失败次数。The number of operation failures is greater than the number of failures in the storage requirement.
在本申请另一个实施例中,还包括:In another embodiment of the present application, it further includes:
结果展示模块503,用于展示测试结果;The result display module 503 is used to display the test result;
其中,所述测试结果包括:所述云存储服务器是否满足预先设置的存储要求,以及以下任意一个或多个:Wherein, the test result includes: whether the cloud storage server meets preset storage requirements, and any one or more of the following:
打开第i个文件的时间、对第i个文件进行每一次操作的时间、打开M个文件的平均时间、打开M个文件的最大时间、打开M个文件的最小时间、对所述第i个文件进行P次操作的平均时间、对所述第i个文件进行P次操作的最大时间、对所述第i个文件进行P次操作的最小时间、操作成功次数、操作失败次数、获取磁盘空间大小时间、删除第i个文件的时间、在第i个文件中搜索字段的时间。The time to open the i-th file, the time to perform each operation on the i-th file, the average time to open M files, the maximum time to open M files, the minimum time to open M files, the The average time for P operations on a file, the maximum time for P operations on the i-th file, the minimum time for P operations on the i-th file, the number of successful operations, the number of failed operations, and disk space acquisition Size time, time to delete the i-th file, time to search the field in the i-th file.
在一个示例性实例中,结果展示模块503以写文件方式展示所述测试结果或以界面方式展示所述测试结果。In an exemplary embodiment, the result display module 503 displays the test result in a file-writing manner or displays the test result in an interface manner.
在一个示例性实例中,配置模块501和测试模块502之间、测试模块502和结果展示模块503之间可以采用消息队列、或者Socket、或者共享内存等方式通信,当然,也可以采用其他方式通信,本申请实施例对配置模块501和测试模块502之间、测试模块502和结果展示模块503之间的通信方式不作限定。In an exemplary embodiment, the configuration module 501 and the test module 502, and the test module 502 and the result display module 503 can communicate in a message queue, or Socket, or shared memory, etc., of course, can also communicate in other ways. The embodiment of the present application does not limit the communication mode between the configuration module 501 and the test module 502, and between the test module 502 and the result display module 503.
本申请实施例通过配置测试项对云存储服务器进行读写文件测试,实现了对云存储接口的性能的测试,从而获得了云存储接口对应的云存储服务器是否满足存储要求,由于测试项中包括了云存储服务器的存储方式、云存储服务器的地址信息,通过修改云存储服务器的存储方式、云存储服务器的地址信息即可实现对不同云存储服务器的读写测试。The embodiment of the application performs a file read and write test on the cloud storage server by configuring the test items to test the performance of the cloud storage interface, thereby obtaining whether the cloud storage server corresponding to the cloud storage interface meets the storage requirements, because the test items include The storage mode of the cloud storage server and the address information of the cloud storage server are modified. Read and write tests on different cloud storage servers can be realized by modifying the storage mode of the cloud storage server and the address information of the cloud storage server.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。A person of ordinary skill in the art can understand that all or some of the steps, functional modules/units in the system, and apparatus in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In the hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may consist of several physical components. The components are executed cooperatively. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Sexual, removable and non-removable media. Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or Any other medium used to store desired information and that can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media. .
虽然本申请实施例所揭露的实施方式如上,但所述的内容仅为便于理解本申请实施例而采用的实施方式,并非用以限定本申请实施例。任何本申请实施例所属领域内的技术人员,在不脱离本申请实施例所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请实施例的专利保护范围,仍须以所附的权利要求书所界定的范围为准。Although the implementation manners disclosed in the embodiments of the present application are as described above, the content described is only the implementation manners used to facilitate the understanding of the embodiments of the present application, and is not intended to limit the embodiments of the present application. Any person skilled in the art of the embodiments of this application can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the embodiments of this application. The scope of patent protection shall still be subject to the scope defined by the appended claims.

Claims (8)

  1. 一种测试云存储接口的方法,包括:A method for testing cloud storage interfaces, including:
    配置测试项;其中,所述测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、操作、操作的文件数目、以及每一个文件对应的操作块大小、文件路径和操作次数;其中,操作包括以下任意一个或多个:读、写、删;Configuration test items; wherein, the test items include: the storage mode of the cloud storage server, the address information of the cloud storage server, the number of threads, the number of operations, the number of files to be operated, and the operation block size, file path, and operation corresponding to each file Times; among them, the operation includes any one or more of the following: read, write, delete;
    启动N个线程,通过N个线程根据配置的云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的第i个文件路径对应的第i个文件,对第i个文件进行P i次操作;其中,N为配置的线程数目,i为1到M的整数,M为配置的文件数目,P i为配置的第i个文件对应的操作次数;每一次操作第i个文件的块大小为配置的第i个文件对应的操作块大小; Start N threads, and access the interface of the cloud storage server according to the storage mode of the configured cloud storage server and the address information of the cloud storage server through the N threads to open the i-th file corresponding to the configured i-th file path. the i-th file P i operations; wherein, N is the number of threads configuration, i is an integer from 1 to M, M being the number of file configuration, P i is the i-th file configuration corresponding to the number of operations; each operation The block size of the i-th file is the operation block size corresponding to the configured i-th file;
    根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求。Determine whether the cloud storage server meets the preset storage requirement according to the time of opening the i-th file and the time of each operation performed on the i-th file.
  2. 根据权利要求1所述的方法,其中,该方法还包括:The method according to claim 1, wherein the method further comprises:
    展示测试结果;Show test results;
    其中,所述测试结果包括所述云存储服务器是否满足预先设置的存储要求,以及以下任意一个或多个:Wherein, the test result includes whether the cloud storage server meets preset storage requirements, and any one or more of the following:
    打开第i个文件的时间、对第i个文件进行每一次操作的时间、打开M个文件的平均时间、打开M个文件的最大时间、打开M个文件的最小时间、对所述第i个文件进行P次操作的平均时间、对所述第i个文件进行P次操作的最大时间、对所述第i个文件进行P次操作的最小时间、操作成功次数、操作失败次数、获取磁盘空间大小时间、删除第i个文件的时间、在第i个文件中搜索字段的时间。The time to open the i-th file, the time to perform each operation on the i-th file, the average time to open M files, the maximum time to open M files, the minimum time to open M files, the The average time for P operations on a file, the maximum time for P operations on the i-th file, the minimum time for P operations on the i-th file, the number of successful operations, the number of failed operations, and disk space acquisition Size time, time to delete the i-th file, time to search the field in the i-th file.
  3. 根据权利要求2所述的方法,其中,所述展示测试结果包括:以写文件方式展示所述测试结果或以界面方式展示所述测试结果。The method according to claim 2, wherein the displaying the test result comprises: displaying the test result in a file-writing manner or displaying the test result in an interface manner.
  4. 根据权利要求1~3任一项所述的方法,其中,所述配置测试项包括: 以配置文件方式配置所述测试项或以界面配置方式配置所述测试项。The method according to any one of claims 1 to 3, wherein the configuring the test item comprises: configuring the test item in a configuration file mode or configuring the test item in an interface configuration mode.
  5. 根据权利要求1~3任一项所述的方法,其中,所述根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求包括以下任意一个或多个:The method according to any one of claims 1 to 3, wherein the determining whether the cloud storage server meets the preset storage requirements is determined based on the time of opening the i-th file and the time of each operation on the i-th file. The requirements include any one or more of the following:
    当满足以下任意一个或多个时,确定所述云存储服务器满足所述存储要求:When any one or more of the following is met, it is determined that the cloud storage server meets the storage requirement:
    打开所述第i个文件的时间小于或等于所述存储要求中的打开文件时间;The time for opening the i-th file is less than or equal to the time for opening the file in the storage requirement;
    对所述第i个文件进行每一次操作的时间均小于或等于所述存储要求中的操作时间;The time for each operation on the i-th file is less than or equal to the operation time in the storage requirement;
    打开M个文件的平均时间小于或等于所述存储要求中的打开文件平均时间;The average time for opening M files is less than or equal to the average time for opening files in the storage requirements;
    打开M个文件的最大时间小于或等于所述存储要求中的打开文件最大时间;The maximum time for opening M files is less than or equal to the maximum time for opening files in the storage requirements;
    打开M个文件的最小时间小于或等于所述存储要求中的打开文件最小时间;The minimum time for opening M files is less than or equal to the minimum time for opening files in the storage requirements;
    对所述第i个文件进行P次操作的平均时间小于或等于所述存储要求中的操作平均时间;The average time for performing P operations on the i-th file is less than or equal to the average time for operations in the storage requirement;
    对所述第i个文件进行P次操作的最大时间小于或等于所述存储要求中的操作最大时间;The maximum time for performing P operations on the i-th file is less than or equal to the maximum operation time in the storage requirement;
    对所述第i个文件进行P次操作的最小时间小于或等于所述存储要求中的操作最小时间;The minimum time for performing P operations on the i-th file is less than or equal to the minimum operation time in the storage requirement;
    操作成功次数大于或等于所述存储要求中的成功次数;The number of successful operations is greater than or equal to the number of successful operations in the storage requirements;
    操作失败次数小于或等于所述存储要求中的失败次数;The number of operation failures is less than or equal to the number of failures in the storage requirements;
    当满足以下任意一个或多个时,确定所述云存储服务器不满足所述存储要求:When any one or more of the following are met, it is determined that the cloud storage server does not meet the storage requirements:
    打开所述第i个文件的时间大于所述存储要求中的打开文件时间;The time for opening the i-th file is greater than the time for opening the file in the storage requirement;
    对所述第i个文件进行操作的时间中至少有一次操作的时间大于所述存 储要求中的操作时间;At least one operation time in the operation time of the i-th file is greater than the operation time in the storage requirement;
    打开M个文件的平均时间大于所述存储要求中的打开文件平均时间;The average time for opening M files is greater than the average time for opening files in the storage requirements;
    打开M个文件的最大时间大于所述存储要求中的打开文件最大时间;The maximum time for opening M files is greater than the maximum time for opening files in the storage requirements;
    打开M个文件的最小时间大于所述存储要求中的打开文件最小时间;The minimum time for opening M files is greater than the minimum time for opening files in the storage requirements;
    对所述第i个文件进行P次操作的平均时间大于所述存储要求中的操作平均时间;The average time for performing P operations on the i-th file is greater than the average time for operations in the storage requirement;
    对所述第i个文件进行P次操作的最大时间大于所述存储要求中的操作最大时间;The maximum time for performing P operations on the i-th file is greater than the maximum operation time in the storage requirement;
    对所述第i个文件进行P次操作的最小时间大于所述存储要求中的操作最小时间;The minimum time for performing P operations on the i-th file is greater than the minimum operation time in the storage requirement;
    操作成功次数小于所述存储要求中的成功次数;The number of successful operations is less than the number of successful operations in the storage requirement;
    操作失败次数大于所述存储要求中的失败次数。The number of operation failures is greater than the number of failures in the storage requirement.
  6. 一种测试云存储接口的装置,包括处理器和计算机可读存储介质,所述计算机可读存储介质中存储有指令,其中,当所述指令被所述处理器执行时,实现如权利要求1~5任一项所述的测试云存储接口的方法。A device for testing a cloud storage interface, comprising a processor and a computer-readable storage medium, the computer-readable storage medium stores instructions, wherein, when the instructions are executed by the processor, the implementation is as in claim 1. ~ Any one of the methods for testing cloud storage interfaces.
  7. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1~5任一项所述的测试云存储接口的方法的步骤。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method for testing a cloud storage interface according to any one of claims 1 to 5 when the computer program is executed by a processor.
  8. 一种测试云存储接口的装置,包括:A device for testing cloud storage interfaces, including:
    配置模块,用于配置测试项;其中,所述测试项包括:云存储服务器的存储方式、云存储服务器的地址信息、线程数目、操作、操作的文件数目、以及每一个文件对应的操作块大小、文件路径和操作次数;其中,操作包括以下任意一个或多个:读、写、删;The configuration module is used to configure test items; wherein, the test items include: storage mode of the cloud storage server, address information of the cloud storage server, number of threads, operations, number of files to be operated, and the size of the operation block corresponding to each file , File path and number of operations; among them, operations include any one or more of the following: read, write, delete;
    测试模块,用于启动N个线程,通过N个线程根据配置的云存储服务器的存储方式和云存储服务器的地址信息访问云存储服务器的接口,以打开配置的第i个文件路径对应的第i个文件,对第i个文件进行P i次操作;其中,N为配置的线程数目,i为1到M的整数,M为配置的文件数目,P i为配置 的第i个文件对应的操作次数;每一次操作第i个文件的块大小为配置的第i个文件对应的操作块大小; The test module is used to start N threads, and access the interface of the cloud storage server according to the storage mode of the configured cloud storage server and the address information of the cloud storage server through the N threads to open the i-th file path corresponding to the configured i-th file path files, i-th file P i operations; wherein, N is the number of threads configuration, i is an integer from 1 to M, M is the number of file configuration, P i corresponds to the i-th file configuration operation Number of times; the block size of each i-th file operation is the operation block size corresponding to the i-th file configured;
    根据打开第i个文件的时间和对第i个文件进行每一次操作的时间确定所述云存储服务器是否满足预先设置的存储要求。Determine whether the cloud storage server meets the preset storage requirement according to the time of opening the i-th file and the time of each operation performed on the i-th file.
PCT/CN2020/114050 2019-09-20 2020-09-08 Cloud storage interface test method and apparatus WO2021052220A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910894317.7A CN112540901A (en) 2019-09-20 2019-09-20 Method and device for testing cloud storage interface
CN201910894317.7 2019-09-20

Publications (1)

Publication Number Publication Date
WO2021052220A1 true WO2021052220A1 (en) 2021-03-25

Family

ID=74883881

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/114050 WO2021052220A1 (en) 2019-09-20 2020-09-08 Cloud storage interface test method and apparatus

Country Status (2)

Country Link
CN (1) CN112540901A (en)
WO (1) WO2021052220A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140068340A1 (en) * 2012-09-03 2014-03-06 Tata Consultancy Services Limited Method and System for Compliance Testing in a Cloud Storage Environment
CN103684921A (en) * 2013-12-18 2014-03-26 创新科存储技术有限公司 Testing method and system for cloud storage system
CN107682213A (en) * 2017-11-16 2018-02-09 郑州云海信息技术有限公司 A kind of system for assessing cloud storage system performance
CN107977296A (en) * 2017-11-20 2018-05-01 郑州云海信息技术有限公司 A kind of method, apparatus and medium of NAS storage system performance test

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140068340A1 (en) * 2012-09-03 2014-03-06 Tata Consultancy Services Limited Method and System for Compliance Testing in a Cloud Storage Environment
CN103684921A (en) * 2013-12-18 2014-03-26 创新科存储技术有限公司 Testing method and system for cloud storage system
CN107682213A (en) * 2017-11-16 2018-02-09 郑州云海信息技术有限公司 A kind of system for assessing cloud storage system performance
CN107977296A (en) * 2017-11-20 2018-05-01 郑州云海信息技术有限公司 A kind of method, apparatus and medium of NAS storage system performance test

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHOU XIAOPENG, ZHANG XIAO-FANG; ZHAO XIAO-NAN: "Research of Performance Evaluation of Cloud Storage", COMPUTER SCIENCE, vol. 41, no. 4, 1 April 2014 (2014-04-01), pages 190 - 194, XP055795365 *

Also Published As

Publication number Publication date
CN112540901A (en) 2021-03-23

Similar Documents

Publication Publication Date Title
US8515911B1 (en) Methods and apparatus for managing multiple point in time copies in a file system
US20140324945A1 (en) Hydration and dehydration with placeholders
BR112015027040B1 (en) Method, computing device and computer storage medium
US9305049B2 (en) Addressing cross-allocated blocks in a file system
US9189493B2 (en) Object file system
US10353867B1 (en) Method and system for verifying files for garbage collection
WO2016000546A1 (en) Method and device for checking influence of deletion of cache file, and mobile terminal
US8380958B2 (en) Spatial extent migration for tiered storage architecture
US20170220288A1 (en) Dynamically managing a table of contents
CN109804359A (en) For the system and method by write back data to storage equipment
WO2019047901A1 (en) Data depositing method
US8219858B2 (en) Method for testing hard disks under an extensible firmware interface
CN107577549A (en) It is a kind of to store the method for testing for deleting function again
US20150169668A1 (en) Single Pass File System Repair With Copy On Write
US9442860B2 (en) Providing record level sharing (RLS) to individual catalogs
US11176034B2 (en) System and method for inline tiering of write data
WO2021052220A1 (en) Cloud storage interface test method and apparatus
US9542120B2 (en) Systems and methods for processing instructions while repairing and providing access to a copied volume of data
US9009430B2 (en) Restoration of data from a backup storage volume
US20160062841A1 (en) Database and data accessing method thereof
CN106611138B (en) GHOST file security check method and device
CN111427756B (en) Method, system, equipment and medium for carrying out mixed pressure test on single hard disk
CN114924914A (en) Disk partition table information backup and recovery method and system
US11016684B1 (en) System and method for managing data and metadata where respective backing block devices are accessed based on whether request indicator indicates the data or the metadata and accessing the backing block devices without file system when the request indicator is not included in request
US9298390B2 (en) Systems and methods for copying data maintained in a dynamic storage volume and verifying the copied data

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: 20865218

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20865218

Country of ref document: EP

Kind code of ref document: A1

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 22.02.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20865218

Country of ref document: EP

Kind code of ref document: A1