CN112311624B - Cloud host testing method and device, storage medium and electronic equipment - Google Patents

Cloud host testing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112311624B
CN112311624B CN202011157902.8A CN202011157902A CN112311624B CN 112311624 B CN112311624 B CN 112311624B CN 202011157902 A CN202011157902 A CN 202011157902A CN 112311624 B CN112311624 B CN 112311624B
Authority
CN
China
Prior art keywords
cloud host
performance
test
cloud
host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011157902.8A
Other languages
Chinese (zh)
Other versions
CN112311624A (en
Inventor
刘婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011157902.8A priority Critical patent/CN112311624B/en
Publication of CN112311624A publication Critical patent/CN112311624A/en
Application granted granted Critical
Publication of CN112311624B publication Critical patent/CN112311624B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention discloses a method and a device for testing a cloud host, a storage medium and electronic equipment, and belongs to the technical field of cloud computing. Wherein, the method comprises the following steps: creating a first cloud host on a local device; connecting the local device and the first cloud host through a first public network IP; importing a testing tool to the first cloud host, wherein the testing tool is used for testing the host performance of the cloud host and generating a testing report; downloading a first test report of the first cloud host from the first cloud host to the local device. According to the invention, the technical problem of low efficiency of manually testing the cloud host in the related technology is solved, manual errors are avoided, and the testing efficiency and the testing accuracy of the cloud host are improved.

Description

Cloud host testing method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method and a device for testing a cloud host, a storage medium and electronic equipment.
Background
In the related art, in order to determine the performance of a cloud host and obtain the computing power of the cloud host, the cloud host needs to be tested, and since the hardware resources of the cloud host are in the cloud end and are inconvenient to directly operate locally, how to efficiently test the cloud host is a technical problem to be solved in the industry.
In the related art, when the performance test is performed on the cloud host, if the comparison test is performed, the test can be performed only through a console of the cloud server, and when the performance results of different types are compared, the performance test results of different types need to be sorted singly, summarized and displayed, and the work is repeated in a locking manner. Because the performance test contains more test items, some indexes are that the result value is smaller and better, some indexes are that the result value is larger and better, the performance of which type is better is not easy to see together, a unified algorithm cannot be adopted for summary comparison, test result data can be only manually processed in a single item, errors are easy to occur, the consumed time is long, and the test efficiency and the test accuracy are low.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing a cloud host, a storage medium and electronic equipment.
According to an aspect of an embodiment of the present application, there is provided a method for testing a cloud host, including: creating a first cloud host on a local device; connecting the local equipment and the first cloud host through a first public network IP; importing a testing tool to the first cloud host, wherein the testing tool is used for testing the host performance of the cloud host and generating a testing report; downloading a first test report for the first cloud host from the first cloud host to the local device.
Further, the method further comprises: creating a second cloud host on the local device, wherein the first cloud host and the second cloud host respectively sign a first cloud server provider and a second cloud server provider, and the first cloud host and the second cloud host have the same configuration; connecting the local equipment and the second cloud host through a second public network IP; importing the test tool to the second cloud host; downloading a second test report of the second cloud host from the second cloud host to the local device; comparing the performance difference of the first cloud host and the second cloud host through the first test report and the second test report.
Further, comparing the performance difference of the first cloud host and the second cloud host through the first test report and the second test report includes: extracting a plurality of first performance values from the first test report, and extracting a plurality of second performance values from the second test report, wherein each performance value corresponds to one test item, and the test items of the first cloud host and the second cloud host are the same; determining the first cloud host as a reference cloud host; replacing the first performance value of the first cloud host with a reference value for each test item; converting the second performance value into a relative value based on a comparison policy and the reference value; and determining the performance difference of the first cloud host and the second cloud host according to the reference value and the relative value.
Further, converting the second performance value into a relative value based on a comparison policy and the reference value comprises: if the comparison strategy is that the performance index is in positive correlation with the performance value, dividing the second performance value by the first performance value to obtain a first relative value; and if the comparison strategy is that the performance index is in negative positive correlation with the performance value, dividing the first performance value by the second performance value to obtain a second relative value.
Further, creating the first cloud host on the local device includes: calling a first software interface on the local equipment to create a virtual cloud host; and transmitting parameter configuration information to the virtual cloud host through the first software interface, and configuring and generating the first cloud host.
Further, connecting the local device and the first cloud host through a first public network IP includes: calling a second software interface on the local equipment to create a first public network IP, wherein the first public network IP is used for bridging the local equipment and a cloud server of the first cloud host; and calling a third software interface on the local equipment to bind the first public network IP and the first cloud host.
Further, before the second software interface is called on the local device to create the first public network IP, the method further includes: invoking a fourth software interface on the local device to track a creation state of the first cloud host on a cloud server, wherein the creation state comprises one of: during creation, the creation is completed; and if the creation state is the creation completed state, determining to call a second software interface on the local equipment to create a first public network IP.
Further, importing a test tool to the first cloud host comprises: creating a login interface on the local device based on a secure shell protocol (SSH), wherein the login interface is used for remotely accessing a cloud server of the first cloud host on the local device; and importing a test tool into the cloud server of the first cloud host from the local equipment, or downloading the test tool to the cloud server of the first cloud host from a network end.
According to another aspect of the embodiments of the present application, there is also provided a test apparatus for a cloud host, including: the system comprises a first creation module, a second creation module and a third creation module, wherein the first creation module is used for creating a first cloud host on local equipment; the first connection module is used for connecting the local equipment and the first cloud host through a first public network IP; the first import module is used for importing a test tool to the first cloud host, wherein the test tool is used for testing the host performance of the cloud host and generating a test report; a first downloading module, configured to download the first test report of the first cloud host from the first cloud host to the local device.
Further, the apparatus further comprises: a second creating module, configured to create a second cloud host on the local device, where the first cloud host and the second cloud host respectively sign a contract for a first cloud server provider and a second cloud server provider, and the first cloud host and the second cloud host have the same configuration; the second connection module is used for connecting the local equipment and the second cloud host through a second public network IP; the second import module is used for importing the test tool into the second cloud host; a second downloading module, configured to download a second test report of the second cloud host from the second cloud host to the local device; a comparison module for comparing the performance difference of the first cloud host and the second cloud host through the first test report and the second test report.
Further, the comparison module includes: an extracting unit, configured to extract a plurality of first performance values from the first test report and a plurality of second performance values from the second test report, where each performance value corresponds to one test item, and the test items of the first cloud host and the second cloud host are the same; a determining unit, configured to determine the first cloud host as a reference cloud host; the first conversion unit is used for replacing the first performance value of the first cloud host with a reference value aiming at each test item; a second conversion unit for converting the second performance value into a relative value based on a comparison policy and the reference value; a determining unit, configured to determine a performance difference between the first cloud host and the second cloud host according to the size of the reference value and the relative value.
Further, the second conversion unit includes: a first conversion subunit, configured to, if the comparison policy is that the performance index is in positive correlation with the performance value, divide the first performance value by the second performance value to obtain a first relative value; and the second conversion subunit is used for dividing the first performance value by the second performance value to obtain a second relative value if the comparison strategy is that the performance index is in negative and positive correlation with the performance value.
Further, the first creating module includes: the creating unit is used for calling a first software interface on the local equipment to create a virtual cloud host; and the configuration unit is used for transmitting the parameter configuration information to the virtual cloud host through the first software interface, and configuring and generating the first cloud host.
Further, the first connection module includes: a creating unit, configured to invoke a second software interface on the local device to create a first public network IP, where the first public network IP is used to bridge the local device and a cloud server of the first cloud host; and the binding unit is used for calling a third software interface on the local equipment to bind the first public network IP and the first cloud host.
Further, the first connection module further includes: a tracking unit, configured to track, before the creating unit invokes the second software interface on the local device to create the first public network IP, a creation state of the first cloud host on the cloud server by invoking a fourth software interface on the local device, where the creation state includes one of: during creation, the creation is completed; and the determining unit is used for determining that a second software interface is called on the local equipment to create the first public network IP if the creation state is the creation completed state.
Further, the first import module includes: a creating unit, configured to create a login interface on the local device based on a secure shell protocol SSH, where the login interface is used to remotely access a cloud server of the first cloud host on the local device; the processing unit is used for leading a test tool into the cloud server of the first cloud host from the local equipment or downloading the test tool to the cloud server of the first cloud host from a network end.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program which performs the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
According to the method and the device, the first cloud host is created on the local device, the local device and the first cloud host are connected through the first public network IP, the test tool is led into the first cloud host, the first test report of the first cloud host is downloaded to the local device from the first cloud host, the cloud host is created and connected locally, the test tool is led in, and the test report is downloaded to the local device after the test is completed, so that the automatic test of the cloud host is realized, the technical problem of low efficiency of manually testing the cloud host in the related technology is solved, the manual error is avoided, and the test efficiency and the test accuracy of the cloud host are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a test computer of a cloud host according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for testing a cloud host according to an embodiment of the invention;
FIG. 3 is a network connection diagram of an embodiment of the present invention;
fig. 4 is a block diagram of a testing apparatus of a cloud host according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device implementing an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
The method provided by the first embodiment of the present application may be executed in a server, a computer, a mobile phone, a tablet, or a similar computing device. Taking an example of running on a computer, fig. 1 is a hardware structure block diagram of a test computer of a cloud host according to an embodiment of the present invention. As shown in fig. 1, computer 10 may include one or more (only one shown in fig. 1) processors 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those of ordinary skill in the art that the configuration shown in FIG. 1 is illustrative only and is not intended to limit the configuration of the computer described above. For example, computer 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to a testing method of a cloud host in an embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to computer 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by the communications provider of computer 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for testing a cloud host is provided, and fig. 2 is a flowchart of a method for testing a cloud host according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
step S202, a first cloud host is established on the local equipment;
the local device of this embodiment may be any form of device such as a computer, a notebook, a mobile phone, etc., the cloud host is a virtual host on the local device, after the creation is completed and the cloud server is connected, the computing resources of the cloud server may be used on the local device, and the cloud host may be divided into various types according to different configurations thereof, for example, into a single-core two-G type and a dual-core 4-G type according to the number of cores and the size of the memory.
Step S204, connecting the local equipment and the first cloud host through the first public network IP;
the public network IP of this embodiment is an IP segment issued by a cloud server manufacturer or a communications carrier, and can access a cloud host on a cloud server at a local device using the public network IP.
Step S206, importing a test tool into the first cloud host, wherein the test tool is used for testing the host performance of the cloud host and generating a test report;
the test tool of the embodiment is a packaged test component, comprises test resources such as test cases and test codes, and is used for automatically starting and running the test cases on the cloud server, testing the cloud host, generating the test report, and transmitting the test report back to the local equipment under the specified path.
Step S208, downloading the first test report of the first cloud host from the first cloud host to the local device.
Through the steps, the first cloud host is created on the local equipment, then the local equipment and the first cloud host are connected through the first public network IP, the test tool is guided into the first cloud host, the first test report of the first cloud host is downloaded to the local equipment from the first cloud host, the test tool is introduced through local creation and access of the cloud host, and the test report is downloaded to the local equipment after the test is completed, so that the automatic test of the cloud host is realized, the technical problem of low efficiency of manual test of the cloud host in the related technology is solved, the manual error is avoided, and the test efficiency and the test accuracy of the cloud host are improved.
In the application scenario of this embodiment, one cloud host may be tested, and multiple cloud hosts may also be tested and contrasted, where in the scenario of testing multiple hosts, performance of two different manufacturers with the same configuration may also be laterally contrasted and tested, and performance of two same manufacturers with different configurations may also be longitudinally contrasted and tested.
In an application scenario of the longitudinal comparison test of the present embodiment, the present embodiment further includes: creating a second cloud host on the local device, wherein the first cloud host and the second cloud host respectively sign a first cloud server merchant and a second cloud server merchant, and the first cloud host and the second cloud host are configured identically; connecting the local equipment and a second cloud host through a second public network IP; importing a test tool into the second cloud host; downloading a second test report of the second cloud host from the second cloud host to the local device; and comparing the performance difference of the first cloud host and the second cloud host through the first test report and the second test report.
In an embodiment of this embodiment, comparing the performance difference between the first cloud host and the second cloud host through the first test report and the second test report includes:
s11, extracting a plurality of first performance values from the first test report and a plurality of second performance values from the second test report, wherein each performance value corresponds to a test item, and the test items of the first cloud host and the second cloud host are the same;
the test items of this embodiment may be, but are not limited to: the method comprises the following steps of CPU performance testing, memory performance testing, io read-write testing and the like, wherein each performance testing comprises a plurality of tests in different directions to form testing sub-items, for example, the CPU performance testing comprises zip compression testing, floating point operation performance, encryption operation performance and the like, the processing speed of the CPU is verified from different directions respectively, and each testing sub-item corresponds to a performance value.
S12, determining the first cloud host as a reference cloud host;
optionally, the second cloud host may also be determined as a reference cloud host, and when different reference cloud hosts are selected, the calculated relative values may be different, but the final comparison result is not affected.
S13, replacing the first performance value of the first cloud host with a reference value for each test item;
optionally, the reference value of this embodiment is a constant value, such as 1, 100, etc., the selection of the reference value has no relation with the first performance value, and the selection of a different reference value does not affect the final comparison result.
In one example, three test items are included, the three first performance values in the first test report are a1, B1, and C1, respectively, and the three second performance values in the second test report are a2, B2, and C2, respectively, where a1, B1, and C1 are all replaced by 1, alternatively, different reference values may be used for different test items, such as a1, B1, and C1 are replaced by 1, 10, and 100, respectively.
S14, converting the second performance value into a relative value based on the comparison strategy and the reference value;
and S15, determining the performance difference of the first cloud host and the second cloud host according to the reference value and the relative value.
In one embodiment of this embodiment, converting the second performance value into a relative value based on the comparison policy and the reference value comprises: if the comparison strategy is that the performance index is in positive correlation with the performance value (namely, the smaller the value is, the better the performance is represented), dividing the second performance value by the first performance value to obtain a first relative value; if the comparison strategy is that the performance index is in negative and positive correlation with the performance value (i.e., the larger the value is, the better the performance is), the first performance value is divided by the second performance value to obtain a second relative value. Optionally, after the conversion is completed, a conversion coefficient may be multiplied to obtain a relative value, for example, in a scenario where the performance index is negatively and positively correlated with the performance value, the reference value of a1 is 1, a2 is m × a1/a2, and m is the conversion coefficient.
In a test scene, two models a and b of different manufacturers are included, after a test report is obtained, firstly, the result of one model is found as a reference, the scores of the reference values are all 1, and when the measurement standard of a comparison strategy is that the smaller the value is, the better the performance is, the score of the model b is calculated through the performance value of the model a/the performance value of the model b; and when the measurement standard of the comparison strategy is that the larger the value is, the better the performance is, the higher the performance value of the model b/the performance value of the model a is, the relative score of the model b is calculated, and finally the score of each item of the model a and the model b is added to form a final score, wherein the larger the score value is, the more excellent the overall performance of the corresponding model is, and conversely, the smaller the value is, the worse the overall performance of the corresponding model is, and the same is true for each test item. Table 1 illustrates model a and model b.
TABLE 1
Model a Model b Comparison strategy Model a Model b
2.9 3.1 The smaller the better 1 0.94
18000 15000 The larger the better 1 0.83
2 1.77
The performance values of the two test items of the model a are 2.9,18000 respectively, the performance values of the two test items corresponding to the model b are 3.1,15000 respectively, through reference value conversion, the values of the model a are 1, the relative values of the model b are 0.94 and 0.83 respectively, and the performance of the model a is better than that of the model b for a second time.
In a scenario of a transverse comparison test, whether the configuration relationship of the cloud host corresponds to the performance value or not may be compared, and a comparison test result is obtained, for example, if the configuration 1 of the model a is (dual-core 1G), the configuration 2 of the model a is (dual-core 2G), and the performance of the configuration 2 is theoretically twice that of the configuration 1, by the above manner, the reference value is replaced, the relative value is converted based on the comparison policy, and the score or total score of the difference item (here, CPU) is counted, if the configuration 2 is twice or more that of the configuration 1, the configuration 2 is better, the cost performance is higher, otherwise, the configuration 2 is poorer, the cost performance is lower, and the specific calculation manner refers to the above embodiment, which is not described herein again.
By adopting the comparison algorithm of the embodiment, the calculation amount of directly using the performance value (the performance value is generally large) can be reduced by setting the reference value and selecting the conversion algorithm of the relative value according to the comparison side path, meanwhile, the artificial errors are reduced, each score is automatically compared and calculated, the total score can be summed and output aiming at the test items with various comparison strategies, the comparison test result is obtained, and the test efficiency and the test accuracy are improved.
In one implementation of this embodiment, creating the first cloud host on the local device includes: calling a first software interface on local equipment to create a virtual cloud host; and transmitting the parameter configuration information to the virtual cloud host through the first software interface, and configuring and generating the first cloud host. Optionally, the first software interface is an open source interface (open api) provided by a cloud service vendor.
In this embodiment, connecting the local device and the first cloud host through the first public network IP includes:
s21, calling a second software interface on the local equipment to create a first public network IP, wherein the first public network IP is used for bridging the local equipment and a cloud server of a first cloud host;
and S22, calling a third software interface on the local equipment to bind the first public network IP and the first cloud host.
Fig. 3 is a network connection diagram of an embodiment of the present invention, in which a cloud host is created on a local device, and a public network IP is used to bridge the local device and the cloud server of the cloud host, using hardware resources of the cloud server.
Optionally, before the invoking the second software interface on the local device to create the first public network IP, the method further includes: invoking a fourth software interface on the local device tracks a creation status of the first cloud host on the cloud server, wherein the creation status comprises one of: during creation, the creation is completed; and if the creation state is the creation completed state, determining to call a second software interface on the local equipment to create the first public network IP.
Because the cloud host needs a period of time for creating on the cloud server, after the creation is completed, the cloud host is in an active (active) state, and remote access and control are allowed.
Optionally, importing the test tool to the first cloud host includes: creating a login interface on the local device based on a Secure Shell (SSH), wherein the login interface is used for remotely accessing a cloud server of the first cloud host on the local device; and importing the test tool into the cloud server of the first cloud host from the local equipment, or downloading the test tool to the cloud server of the first cloud host from the network side.
In this embodiment, SSH provides two levels of security authentication to securely log in to the cloud server on the local device. First level (password-based security authentication): the remote host can log in as long as the own account number and password are known. All transmitted data is encrypted, but there is no guarantee that the cloud server that is connecting is the one that wants to connect. There may be other servers that are impersonating the true server, i.e., being attacked in this manner by "man in the middle". Second level (key-based security authentication): the client software sends a request to the server to request the security verification with your key, and after receiving the request, the server searches the public key under your main directory on the server and then compares the public key with the sent public key. If the two keys are identical, the server encrypts a "challenge" (challenge) with the public key and sends it to the client software. After receiving the 'challenge', the client software can decrypt the 'challenge' by using the private key of the user and then send the 'challenge' to the cloud server. In this way, the password of the own key must be known. However, in contrast to the first level, the second level does not require the transmission of a password over the network. The second level not only encrypts all the transmitted data, but also "man in the middle" attacks are not possible (because there is no private key).
In a complete implementation flow of this embodiment, the method includes: firstly, a cloud host is created on local equipment by calling an interface (nova api), configuration information of the type of the created host can be transmitted in a parameter transmission mode, then an interface for checking details of the host is called, the state of the host is tracked (during creation and completed), when the state is created and the state of the host is active, an EIP (public network IP) is created, an EIP (public network IP address) is bound to the created cloud host, the cloud host is logged on a cloud server and connected to the inside of the cloud host in an SSH (secure Shell) mode, a test tool is led into the cloud host or downloaded to the local part of the cloud host, then the test tool is triggered to execute a test command to carry out performance test, after the performance test is completed, a test report is collected, when performance results (performance values) of two types of the cloud host needing to be compared are obtained, a reference value and a relative value are converted, and finally each cloud host gives a score, and finally, comparing and testing, and outputting a test result of the comparison and testing.
By adopting the scheme of the embodiment, the performance test of the cloud host is automatically executed, the test result is collected, and the comparison test is carried out based on the test. The host computer, the installation tool, the execution tool and the result summarization are established in an automatic mode, manual operation is not needed, and the test efficiency is higher. By adopting the comparison algorithm of the embodiment, which cloud host of different types is better in performance can be visually seen, the probability of artificial errors is reduced, and the test accuracy is improved.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a testing apparatus for a cloud host is further provided, which is used to implement the foregoing embodiments and preferred embodiments, and the description of which is already given is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a testing apparatus for a cloud host according to an embodiment of the present invention, and as shown in fig. 4, the testing apparatus includes: a first creation module 40, a first connection module 42, a first import module 44, a first download module 46, wherein,
a first creation module 40 for creating a first cloud host on a local device;
a first connection module 42, configured to connect the local device and the first cloud host through a first public network IP;
a first importing module 44, configured to import a test tool to the first cloud host, where the test tool is configured to test host performance of the cloud host and generate a test report;
a first downloading module 46, configured to download the first test report of the first cloud host from the first cloud host to the local device.
Optionally, the apparatus further comprises: a second creating module, configured to create a second cloud host on the local device, where the first cloud host and the second cloud host respectively sign a contract for a first cloud server provider and a second cloud server provider, and the first cloud host and the second cloud host have the same configuration; the second connection module is used for connecting the local equipment and the second cloud host through a second public network IP; the second import module is used for importing the test tool into the second cloud host; a second downloading module, configured to download a second test report of the second cloud host from the second cloud host to the local device; a comparison module for comparing the performance difference between the first cloud host and the second cloud host through the first test report and the second test report.
Optionally, the comparing module includes: an extracting unit, configured to extract a plurality of first performance values from the first test report and a plurality of second performance values from the second test report, where each performance value corresponds to one test item, and the test items of the first cloud host and the second cloud host are the same; a determining unit, configured to determine the first cloud host as a reference cloud host; the first conversion unit is used for replacing the first performance value of the first cloud host with a reference value aiming at each test item; a second conversion unit for converting the second performance value into a relative value based on a comparison policy and the reference value; a determining unit, configured to determine a performance difference between the first cloud host and the second cloud host according to the size of the reference value and the relative value.
Optionally, the second conversion unit includes: a first conversion subunit, configured to, if the comparison policy is that the performance index is in positive correlation with the performance value, divide the first performance value by the second performance value to obtain a first relative value; and the second conversion subunit is used for dividing the first performance value by the second performance value to obtain a second relative value if the comparison strategy is that the performance index is in negative and positive correlation with the performance value.
Optionally, the first creating module includes: the creating unit is used for calling a first software interface on the local equipment to create a virtual cloud host; and the configuration unit is used for transmitting the parameter configuration information to the virtual cloud host through the first software interface, and configuring and generating the first cloud host.
Optionally, the first connection module includes: a creating unit, configured to invoke a second software interface on the local device to create a first public network IP, where the first public network IP is used to bridge the local device and a cloud server of the first cloud host; and the binding unit is used for calling a third software interface on the local equipment to bind the first public network IP and the first cloud host.
Optionally, the first connection module further includes: a tracking unit, configured to track, before the creating unit invokes the second software interface on the local device to create the first public network IP, a creation state of the first cloud host on the cloud server by invoking a fourth software interface on the local device, where the creation state includes one of: during creation, the creation is completed; and the determining unit is used for determining that a second software interface is called on the local equipment to create the first public network IP if the creation state is the creation completed state.
Optionally, the first import module includes: a creating unit, configured to create a login interface on the local device based on a secure shell protocol SSH, where the login interface is used to remotely access a cloud server of the first cloud host on the local device; the processing unit is used for leading a test tool into the cloud server of the first cloud host from the local equipment or downloading the test tool to the cloud server of the first cloud host from a network end.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, creating a first cloud host on the local device;
s2, connecting the local device and the first cloud host through a first public network IP;
s3, importing a test tool to the first cloud host, wherein the test tool is used for testing the host performance of the cloud host and generating a test report;
s4, downloading the first test report of the first cloud host from the first cloud host to the local device.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, creating a first cloud host on the local device;
s2, connecting the local device and the first cloud host through a first public network IP;
s3, importing a test tool to the first cloud host, wherein the test tool is used for testing the host performance of the cloud host and generating a test report;
s4, downloading the first test report of the first cloud host from the first cloud host to the local device.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Fig. 5 is a block diagram of an electronic device implementing an embodiment of the invention. As shown in fig. 5, the device includes a processor 41 and a memory 42 for storing data, which are connected by a communication bus 44, and a communication interface 43 connected to the communication bus 44 and adapted to connect with other components or external devices.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be implemented in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (9)

1. A method for testing a cloud host is characterized by comprising the following steps:
creating a first cloud host on a local device;
connecting the local equipment and the first cloud host through a first public network IP;
importing a testing tool to the first cloud host, wherein the testing tool is used for testing the host performance of the cloud host and generating a testing report;
downloading a first test report of the first cloud host from the first cloud host to the local device;
creating a second cloud host on the local device, wherein the first cloud host and the second cloud host respectively sign a first cloud server provider and a second cloud server provider, and the first cloud host and the second cloud host have the same configuration;
connecting the local device and the second cloud host through a second public network IP;
importing the test tool to the second cloud host;
downloading a second test report of the second cloud host from the second cloud host to the local device;
comparing the performance difference of the first cloud host and the second cloud host through the first test report and the second test report;
wherein comparing the performance difference of the first cloud host and the second cloud host through the first test report and the second test report comprises:
extracting a plurality of first performance values from the first test report, and extracting a plurality of second performance values from the second test report, wherein each performance value corresponds to one test item, and the test items of the first cloud host and the second cloud host are the same;
determining the first cloud host as a reference cloud host;
replacing the first performance value of the first cloud host with a reference value for each test item;
converting the second performance value into a relative value based on a comparison policy and the reference value;
determining the performance difference of the first cloud host and the second cloud host according to the reference value and the relative value;
wherein the test items comprise cpu performance tests, and the cpu performance tests comprise the following test sub items: zip compression test, floating point operation performance and encryption operation performance, which are used for verifying the processing speed of the cpu from different directions respectively, wherein each test sub item corresponds to a performance value.
2. The method of claim 1, wherein converting the second performance value to a relative value based on a comparison policy and the reference value comprises:
if the comparison strategy is that the performance index is in positive correlation with the performance value, dividing the second performance value by the first performance value to obtain a first relative value;
and if the comparison strategy is that the performance index is in negative positive correlation with the performance value, dividing the first performance value by the second performance value to obtain a second relative value.
3. The method of claim 1, wherein creating the first cloud host on the local device comprises:
calling a first software interface on the local equipment to create a virtual cloud host;
and transmitting parameter configuration information to the virtual cloud host through the first software interface, and configuring and generating the first cloud host.
4. The method of claim 1, wherein connecting the local device and the first cloud host over a first public network IP comprises:
calling a second software interface on the local equipment to create a first public network IP, wherein the first public network IP is used for bridging the local equipment and a cloud server of the first cloud host;
and calling a third software interface on the local equipment to bind the first public network IP and the first cloud host.
5. The method of claim 4, wherein prior to invoking the second software interface on the local device to create the first public network IP, the method further comprises:
invoking a fourth software interface on the local device to track a creation state of the first cloud host on a cloud server, wherein the creation state comprises one of: during creation, the creation is completed;
and if the creation state is the creation completed state, determining to call a second software interface on the local equipment to create a first public network IP.
6. The method of claim 1, wherein importing a test tool into the first cloud host comprises:
creating a login interface on the local device based on a secure shell protocol (SSH), wherein the login interface is used for remotely accessing a cloud server of the first cloud host on the local device;
and importing a test tool into the cloud server of the first cloud host from the local equipment, or downloading the test tool to the cloud server of the first cloud host from a network end.
7. A test device of a cloud host is characterized by comprising:
the system comprises a first creation module, a second creation module and a third creation module, wherein the first creation module is used for creating a first cloud host on local equipment;
the first connection module is used for connecting the local equipment and the first cloud host through a first public network IP;
the first import module is used for importing a test tool to the first cloud host, wherein the test tool is used for testing the host performance of the cloud host and generating a test report;
a first downloading module, configured to download a first test report of the first cloud host from the first cloud host to the local device;
a second creating module, configured to create a second cloud host on the local device, where the first cloud host and the second cloud host respectively sign a contract for a first cloud server provider and a second cloud server provider, and the first cloud host and the second cloud host have the same configuration;
the second connection module is used for connecting the local equipment and the second cloud host through a second public network IP;
the second import module is used for importing the test tool into the second cloud host;
a second downloading module, configured to download a second test report of the second cloud host from the second cloud host to the local device;
a comparison module for comparing the performance difference of the first cloud host and the second cloud host through the first test report and the second test report;
the comparison module comprises: an extracting unit, configured to extract a plurality of first performance values from the first test report and a plurality of second performance values from the second test report, where each performance value corresponds to one test item, and the test items of the first cloud host and the second cloud host are the same; a determining unit, configured to determine the first cloud host as a reference cloud host; the first conversion unit is used for replacing the first performance value of the first cloud host with a reference value aiming at each test item; a second conversion unit for converting the second performance value into a relative value based on a comparison policy and the reference value; a determining unit, configured to determine a performance difference between the first cloud host and the second cloud host according to the reference value and the relative value;
wherein the test items comprise cpu performance tests, and the cpu performance tests comprise the following test sub-items: zip compression test, floating point operation performance and encryption operation performance, which are used for verifying the processing speed of the cpu from different directions respectively, wherein each test sub item corresponds to a performance value.
8. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method steps of any of the preceding claims 1 to 6 by means of a processor.
9. An electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1 to 6 by executing a program stored on a memory.
CN202011157902.8A 2020-10-26 2020-10-26 Cloud host testing method and device, storage medium and electronic equipment Active CN112311624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011157902.8A CN112311624B (en) 2020-10-26 2020-10-26 Cloud host testing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011157902.8A CN112311624B (en) 2020-10-26 2020-10-26 Cloud host testing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112311624A CN112311624A (en) 2021-02-02
CN112311624B true CN112311624B (en) 2022-08-16

Family

ID=74331017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011157902.8A Active CN112311624B (en) 2020-10-26 2020-10-26 Cloud host testing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112311624B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992511A (en) * 2021-10-19 2022-01-28 京东科技信息技术有限公司 Cloud host creation method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108923997A (en) * 2018-05-24 2018-11-30 广东睿江云计算股份有限公司 A kind of cloud service node automatic test approach and device based on python
CN109101385A (en) * 2018-08-16 2018-12-28 郑州云海信息技术有限公司 A kind of automation method for testing pressure and system based on cloud computing
CN111104321A (en) * 2019-12-16 2020-05-05 烽火通信科技股份有限公司 Docker-based cloud platform stability testing method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160134508A1 (en) * 2014-11-12 2016-05-12 International Business Machines Corporation Non-disruptive integrated network infrastructure testing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108923997A (en) * 2018-05-24 2018-11-30 广东睿江云计算股份有限公司 A kind of cloud service node automatic test approach and device based on python
CN109101385A (en) * 2018-08-16 2018-12-28 郑州云海信息技术有限公司 A kind of automation method for testing pressure and system based on cloud computing
CN111104321A (en) * 2019-12-16 2020-05-05 烽火通信科技股份有限公司 Docker-based cloud platform stability testing method and system

Also Published As

Publication number Publication date
CN112311624A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN108549580B (en) Method for automatically deploying Kubernets slave nodes and terminal equipment
CN110011988B (en) Block chain-based certificate verification method and device, storage medium and electronic device
CN108734028B (en) Data management method based on block chain, block chain link point and storage medium
CN108365961B (en) The response method and server that interface call method and terminal device, interface call
CN104715183B (en) A kind of trust authentication method and apparatus during virtual machine operation
CN110995640B (en) Method for identifying network attack and honeypot protection system
CN106341381A (en) Method and system of key management for rack server system
CN103067372B (en) Cloud terminal logs in method and the login system of Cloud Server
US20150288703A1 (en) Data possession verification system and method
CN114363036A (en) Network attack path acquisition method and device and electronic equipment
CN110875850A (en) Firmware upgrading method and system, readable storage medium and terminal equipment
CN109088902A (en) Register method and device, authentication method and device
CN109660487B (en) Authorization method based on H5 webpage, storage medium, electronic device and system
CN112311624B (en) Cloud host testing method and device, storage medium and electronic equipment
CN111859424B (en) Data encryption method, system, terminal and storage medium of physical management platform
CN111176567B (en) Storage supply verification method and device for distributed cloud storage
CN107223322A (en) The method, apparatus and system of signature verification
CN113709188B (en) Session control information processing method, device, system and storage medium
CN110673507A (en) Data simulation method and device for Internet of things equipment
CN114785805B (en) Data transmission method, device, electronic equipment and storage medium
CN110232570A (en) A kind of information monitoring method and device
CN113051622B (en) Index construction method, device, equipment and storage medium
CN113254989B (en) Fusion method and device of target data and server
CN115129249A (en) SAS link topology identification management method, system, terminal and storage medium
CN110502915B (en) Data processing method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant