Method, device, equipment and product for testing performance of network card
By establishing a collection of test items and use cases, the performance test of network cards in the system is solved, and the problem of inconsistent network card management in the existing technology is achieved, efficient and reliable network card performance testing is achieved, which is suitable for multiple operating systems and multiple network cards.
Patent Information
- Application Number
- CN202510522173.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-12
AI Technical Summary
The existing technology lacks a full understanding of the unified management and performance status of network cards in the system, which affects the reliability and overall operation efficiency of the system network.
Create several test items for testing different functions of network cards, and build a corresponding set of test cases, scan all network cards in the system, select test items to test the target network cards, generate test logs, and support testing of multiple operating systems and multiple network cards.
It realizes efficient performance testing of multiple operating systems and multiple network cards, improves the efficiency and reliability of network card testing, and expands the scope of application.
Smart Images

Figure CN120474947A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network card performance testing, and in particular relates to a method, device, equipment and product for network card performance testing. Background Art
[0002] With the rapid development of computer network technology, network cards (NICs), the interface devices that connect various network devices, are becoming increasingly common. The proper performance of NICs directly affects the reliability of the entire system network. Under current technological conditions, how to uniformly manage NICs in the system, fully understand their performance, and ensure they maintain normal operation across different platforms, thereby improving the overall efficiency and reliability of the entire system, has become a pressing issue that needs to be addressed. Summary of the Invention
[0003] In view of this, the present invention aims to overcome the defects in the prior art and proposes a method, device, equipment and product for network card performance testing.
[0004] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0005] In a first aspect, the present invention discloses a method for testing the performance of a network card, comprising: establishing a plurality of test items for testing different functions of the network card, and establishing a set of test cases corresponding to each test item;
[0006] Scan the current system to determine all network cards included in the current system;
[0007] For the target network card that needs to be tested, select the test item, call the corresponding test case to perform performance test on the target network card, and generate a test log to represent the test results.
[0008] In one embodiment of the present invention, before selecting a test item and calling a corresponding test case to perform a performance test on a target network card, the method further includes: checking whether a dependency package of the selected test item has been installed; if not, installing the dependency package.
[0009] In one embodiment of the present invention, the pip3 source address of the installation dependency package is set.
[0010] In one embodiment of the present invention, for the target network card that needs to be tested, a test item is selected and the corresponding test case is called to perform a performance test on the target network card, including: customizing the network card information of the target network card, the network card information includes the network card name, network card IP and network card mask.
[0011] In one embodiment of the present invention, the test log is named after the corresponding test item and saved in a designated directory.
[0012] In one embodiment of the present invention, the test log saved in the designated directory is uploaded to the server, and the server displays the test result of the network card in the form of a web page.
[0013] In a second aspect, the present invention discloses a device for testing network card performance, the device comprising:
[0014] The test item creation module is used to create several test items for testing different functions of the network card, and to create a set of test cases corresponding to each test item;
[0015] Scan module, used to scan the current system and determine all network cards included in the current system;
[0016] The test module is used to select test items for the target network card that needs to be tested, call the corresponding test case to perform performance testing on the target network card, and generate a test log to represent the test results.
[0017] In a third aspect, the present invention discloses an electronic device comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above method.
[0018] In a fourth aspect, the present invention discloses a computer-readable storage medium having a computer program stored thereon, which implements the above method when executed by a processor.
[0019] In a fifth aspect, the present invention discloses a computer program product, comprising a computer program, which implements the above method when executed by a processor.
[0020] Compared with the prior art, the present invention has the following advantages:
[0021] The present invention discloses a method, apparatus, equipment, and product for network card performance testing, comprising: establishing a plurality of test items for testing different functions of a network card, and establishing a set of test cases corresponding to each test item; scanning a current system to determine all network cards included in the current system; selecting a test item for a target network card to be tested, calling a corresponding test case to perform a performance test on the target network card, and generating a test log for representing the test results. The present invention discloses a method, apparatus, equipment, and product for network card performance testing, which can be suitable for a variety of different types of operating systems, such as the Kylin server operating system, and can simultaneously perform different types of performance tests on multiple target network cards, can preset different test items, and can adjust the set of test cases corresponding to the test items at any time. The method has the characteristics of high network card testing efficiency, reliable performance, and a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0023] In the attached figure:
[0024] Figure 1 A schematic diagram of an application scenario of a method for network card performance testing according to an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of a method for testing network card performance according to an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of test items of a method for testing network card performance according to an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of a server side of a method for network card performance testing according to an embodiment of the present invention;
[0028] Figure 5 A schematic diagram of a device for network card performance testing according to an embodiment of the present invention;
[0029] Figure 6 The figure is a schematic diagram of an electronic device for network card performance testing according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other.
[0031] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0032] In the description of the present invention, it should be further clarified that the terms "first," "second," etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first," "second," etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0033] The present invention discloses a method, device, equipment and product for network card performance testing, and application scenarios thereof. Figure 1 As shown, under the existing technical conditions, there is a lack of unified management of network cards in the system and a testing method for fully understanding the performance status of network cards. The present invention discloses a method, device, equipment and product for network card performance testing, including: establishing several test items for testing different functions of network cards, and establishing a set of test cases corresponding to each test item; scanning the current system to determine all network cards contained in the current system; for the target network card to be tested, selecting a test item, calling the corresponding test case to perform performance testing on the target network card, and generating a test log for representing the test results, which can be suitable for a variety of different types of operating systems, such as the Kylin server operating system, and performing different types of performance tests on multiple target network cards at the same time.
[0034] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0035] In one embodiment of the present invention, Figure 2 As shown, a method for testing network card performance includes:
[0036] Step S201: Figure 2 and 3 As shown, several test items are established to test different functions of the network card, and a test case set corresponding to each test item is established;
[0037] In this example, the test framework dependency package is installed and the pip3 source is configured.
[0038] In this embodiment, one test item may correspond to several test cases.
[0039] Step S202: Scan the current system to determine all network cards included in the current system;
[0040] Step S203: For the target network card to be tested, select a test item, call the corresponding test case to perform a performance test on the target network card, and generate a test log for indicating the test result.
[0041] In this embodiment, before performing a performance test on the target network card, a test authorization may be performed first.
[0042] In this embodiment, before performing a performance test on the target network card, an estimated test completion time may be generated based on the selected test items.
[0043] Based on the previous embodiment, in another embodiment of the present invention, before selecting a test item and calling the corresponding test case to perform a performance test on the target network card, it also includes: checking whether the dependency package of the selected test item has been installed, and if not, installing the dependency package.
[0044] In this embodiment, the pip3 source address of the installation dependency package is set.
[0045] Based on the previous embodiment, in another embodiment of the present invention, for the target network card that needs to be tested, a test item is selected, and the corresponding test case is called to perform a performance test on the target network card, including: customizing the network card information of the target network card, the network card information includes the network card name, network card IP and network card mask.
[0046] In this embodiment, the network card information of the target network card can be customized. In another embodiment of the present invention, the target network card to be tested can also be selected based on a list of all network cards included in the current system obtained by scanning the current system.
[0047] In one embodiment of the present invention, Figure 4 As shown, the test log is named with the corresponding test item name and saved in the specified directory; the test log saved in the specified directory is uploaded to the server, and the server displays the test results of the network card in the form of a web page.
[0048] In this embodiment, the server displays the test results of the network card in the form of a web page and provides a test result download function.
[0049] In this embodiment, the test logs may be packaged and compressed before being uploaded.
[0050] In this embodiment, the test logs are packaged and compressed to improve the confidentiality and security of the test results.
[0051] like Figure 5 As shown, the present invention also discloses a device for network card performance testing, comprising:
[0052] The test item establishment module 501 is used to establish a number of test items for testing different functions of the network card, and to establish a test case set corresponding to each test item;
[0053] Scanning module 502, used to scan the current system and determine all network cards included in the current system;
[0054] The testing module 503 is used to select test items for the target network card to be tested, call corresponding test cases to perform performance tests on the target network card, and generate a test log for indicating the test results.
[0055] The present invention also discloses an electronic device, such as Figure 6 As shown, an embodiment is disclosed, which is a block diagram of the electronic device for network card performance testing.
[0056] The electronic device 60 of this embodiment includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the ROM 602 or the program loaded from the storage part 608 into the RAM 603. The processor 601 may include, for example, a general-purpose microprocessor, an instruction set processor and / or a related chipset and / or a dedicated microprocessor, etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present invention.
[0057] RAM 603 stores various programs and data required for the operation of electronic device 60. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 executes the programs in ROM 602 and / or RAM 603 to perform various operations according to the method flow of the embodiment of the present invention. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603, and processor 601 may also execute the programs stored in one or more memories to perform various operations according to the method flow of the embodiment of the present invention.
[0058] According to an embodiment of the present invention, the electronic device 60 may further include an I / O interface 605, which is also connected to the bus 604. The electronic device 60 may further include one or more of the following components connected to the I / O interface 605: an input unit 606 including a keyboard, a mouse, etc.; an output unit 607 including a cathode ray tube, a liquid crystal display, and a speaker; a storage unit 608 including a hard disk; and a communication unit 609 including a network interface card such as a LAN card or a modem. The communication unit 609 performs communication processing via a network such as the Internet. A drive 6010 is also connected to the I / O interface 605 as needed. Removable media 6011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in the drive 6010 as needed, so that computer programs read therefrom can be installed into the storage unit 608 as needed.
[0059] The present invention also provides a computer-readable storage medium.
[0060] The computer-readable storage medium may be included in the electronic device / device system described in the above embodiments, or may exist independently and not be incorporated into the electronic device / device. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of the present invention.
[0061] According to embodiments of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples include, but are not limited to, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0062] Embodiments of the present invention also include a computer program product.
[0063] The computer program product includes a computer program, which contains program code for executing the method provided by the embodiment of the present invention. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the method provided by the embodiment of the present invention.
[0064] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal over a network medium. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0065] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written by any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages. Programming languages include, but are not limited to, Java, C++, Python, C language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network or a wide area network, or can be connected to an external computing device.
[0066] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, as well as the combination of boxes in the block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or may be implemented using a combination of dedicated hardware and computer instructions. It will be understood by those skilled in the art that the features described in the various embodiments and / or claims of the present invention may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments and / or claims of the present invention may be combined and / or coupled in various ways, and all such combinations and / or couplings fall within the scope of the present invention.
[0067] The embodiments of the present invention have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although each embodiment has been described above separately, this does not mean that the measures in each embodiment cannot be advantageously used in combination. The scope of the present invention is defined by the appended claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A method for testing network card performance, characterized in that: include: Establish several test items for testing different functions of the network card, and establish a test case set corresponding to each test item; Scan the current system to determine all network cards included in the current system; For the target network card that needs to be tested, the test item is selected, the corresponding test case is called to perform a performance test on the target network card, and a test log for indicating the test result is generated.
2. The method for network card performance testing according to claim 1, wherein: Before selecting the test item and calling the corresponding test case to perform performance testing on the target network card, the method further includes: checking whether a dependency package of the selected test item has been installed; if not, installing the dependency package.
3. A method for network card performance testing according to claim 2, characterized in that: Set the pip3 source address for installing the dependency package.
4. The method for network card performance testing according to claim 1, wherein: For the target network card that needs to be tested, the test item is selected and the corresponding test case is called to perform performance testing on the target network card, including: customizing the network card information of the target network card, the network card information including the network card name, network card IP and network card mask.
5. The method for network card performance testing according to claim 1, wherein: The test log is named after the corresponding test item and saved in a specified directory.
6. The method for network card performance testing according to claim 5, wherein: The test log saved in the designated directory is uploaded to the server, and the server displays the test result of the network card in the form of a web page.
7. A device for testing network card performance, characterized by: The device comprises: A test item establishment module is used to establish a number of test items for testing different functions of the network card, and to establish a test case set corresponding to each test item; A scanning module, configured to scan the current system and determine all network cards included in the current system; The test module is used to select the test items for the target network card to be tested, call the corresponding test case to perform performance test on the target network card, and generate a test log for indicating the test result.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.