CN110768855A - Method and device for testing linkmzation performance - Google Patents

Method and device for testing linkmzation performance Download PDF

Info

Publication number
CN110768855A
CN110768855A CN201810840724.5A CN201810840724A CN110768855A CN 110768855 A CN110768855 A CN 110768855A CN 201810840724 A CN201810840724 A CN 201810840724A CN 110768855 A CN110768855 A CN 110768855A
Authority
CN
China
Prior art keywords
test
scope
network communication
link
performance
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.)
Granted
Application number
CN201810840724.5A
Other languages
Chinese (zh)
Other versions
CN110768855B (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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810840724.5A priority Critical patent/CN110768855B/en
Publication of CN110768855A publication Critical patent/CN110768855A/en
Application granted granted Critical
Publication of CN110768855B publication Critical patent/CN110768855B/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/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • 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
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/133Protocols for remote procedure calls [RPC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Abstract

The invention discloses a method and a device for testing linkmzation performance, and relates to the technical field of computers. One embodiment of the method comprises: generating a test link by setting applications to be tested to the same scope, wherein only the applications in the same scope can perform data communication; using the test link to carry out performance test; and after the test is finished, restoring the scope of the application to be tested. The implementation mode can automatically isolate the test flow from the production flow, greatly saves the time cost for performance test preparation and the server cost, improves the efficiency of system performance test, and enables the linkability performance test to be more convenient and safer.

Description

Method and device for testing linkmzation performance
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for testing link performance.
Background
As internet users increase and access peaks due to various special events occur, network services have higher and higher requirements for system performance. Whether the system can bear instant high concurrency and has higher response speed is the key of user experience, so the performance test becomes more important, and the performance test scheme is gradually changed from a single machine test to a cluster test and a link test. The link refers to a data transmission link, for example, application a calls application B, which calls application C, and then data is transmitted from application a to application B to application C, which forms a data transmission link in the system. However, the cost consumption of the link performance test is relatively large, and a set of proprietary test links is usually required to be constructed to complete the communication of the traffic on the whole link, otherwise the test data affects the production data. Thus, online linkability performance testing becomes time consuming and laborious.
The linkability performance test is different from a single cluster test, and needs a cluster service to transmit the flow to a downstream system, so that the performance test effect on the downstream system is also achieved. Often, a critical link associates 4, 5 systems, eventually reaching the persistence layer. Therefore, the difficulty of the link-based test mainly lies in the cooperative work of multiple systems, and one link-based performance test may require the cooperation of tens of people to ensure that the respective systems are configured correctly, and monitor the states of the systems during the test process to ensure that the systems work normally.
The existing link performance test method mainly comprises the following 3 methods:
1. performing a linkability performance test by building a test link, wherein firstly, a machine is used for performing the performance test from an offline part in a production environment; secondly, the grouping is changed by modifying the virtual IP address or other configuration centers; then, modifying the configuration file of the system and restarting the system to connect the upstream and downstream systems; finally, after the test is finished, the environment is recovered;
2. performing a linkability performance test based on a flow identification method, wherein research and development personnel are required to modify a flow code and forward data with a test identifier to a specified downstream system so as to realize the linkability performance test;
3. the linkability performance test is carried out based on an online mirroring method, an environment which is the same as a production environment needs to be copied, and then the test is carried out in the mirroring environment.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1. in the above 3 link performance testing methods, each system in the link lacks uniform configuration management, and cannot uniformly monitor the working state of the current testing system;
2. the testing link is built to test the linkability performance, and the process of building the testing link is complex and is easy to make mistakes;
3. when a new test identifier needs to be added, the code needs to be rewritten again, and the process is complicated;
4. the link performance test is carried out based on an on-line mirror image method, a large amount of server resources are occupied, two sets of environments need to be maintained, and the labor and resource cost is wasted.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for testing link performance, which can automatically isolate a test flow from a production flow, greatly save time cost for performance test preparation and server cost, improve efficiency of system performance test, and make the link performance test more convenient and safer.
To achieve the above object, according to an aspect of the embodiments of the present invention, a method for testing link performance is provided.
A method of testing link performance, comprising: generating a test link by setting applications to be tested to the same scope, wherein only the applications in the same scope can perform data communication; performing a performance test using the test link; and after the test is finished, restoring the scope of the application to be tested.
Optionally, the method further comprises: the scope of the application to be tested is set by adding the scope attribute in the network communication framework.
Optionally, when the network communication framework is a standard network communication protocol, adding a scope attribute in the network communication framework by adding a customized scope field in a message body of the network communication protocol.
Optionally, when the network communication framework is an encapsulated network communication protocol, adding a scope attribute in the network communication framework by adding a customized scope field in the encapsulated network communication protocol.
Optionally, the attribute value of the scope attribute comprises an application identification and an identification of a machine on which the application is deployed.
Optionally, the performing the performance test by using the test link includes: and acquiring the state parameters of the test link in real time, and judging whether test adjustment is needed or not according to the state parameters and a preset state threshold.
According to another aspect of the embodiments of the present invention, an apparatus for testing link performance is provided.
An apparatus for linkability performance testing, comprising: the link generation module is used for generating a test link by setting the applications to be tested to be the same scope, wherein only the applications in the same scope can carry out data communication; the performance testing module is used for performing performance testing by using the testing link; and the link recovery module is used for restoring the scope of the application to be tested after the test is finished.
Optionally, the system further comprises an attribute setting module, configured to: the scope of the application to be tested is set by adding the scope attribute in the network communication framework.
Optionally, when the network communication framework is a standard network communication protocol, adding a scope attribute in the network communication framework by adding a customized scope field in a message body of the network communication protocol.
Optionally, when the network communication framework is an encapsulated network communication protocol, adding a scope attribute in the network communication framework by adding a customized scope field in the encapsulated network communication protocol.
Optionally, the attribute value of the scope attribute comprises an application identification and an identification of a machine on which the application is deployed.
Optionally, the performance testing module is further configured to: and acquiring the state parameters of the test link in real time, and judging whether test adjustment is needed or not according to the state parameters and a preset state threshold.
According to another aspect of the embodiments of the present invention, an electronic device for testing link performance is provided.
An electronic device for testing link performance, comprising: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for testing the linkmzation performance provided by the embodiment of the invention.
According to yet another aspect of embodiments of the present invention, a computer-readable medium is provided.
A computer readable medium, on which a computer program is stored, which when executed by a processor implements the method for testing the link performance provided by the embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: the application to be tested is set to be the same scope to generate a test link, the test link is used for performance test, and after the test is completed, the scope of the application to be tested is restored, the scope strategy of a network communication framework is realized, the scope of the application to be tested is uniformly set to be a test domain, the test flow and the production flow are automatically isolated, the time cost for performance test preparation and the server cost are greatly saved, the efficiency of system performance test is improved, and the link performance test is more convenient and safer. Meanwhile, the method for testing the linkmzation performance of the embodiment of the invention can also carry out unified monitoring on each application system in the test link, ensure the safety of the system and provide a basis for capacity evaluation. In addition, the method for testing the linkmzation performance of the embodiment of the invention is an automatic performance test, reduces manual intervention, prevents human errors, saves labor cost, can execute the on-line linkmzation performance test at any time and realizes the normalization of the performance test.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram illustrating an implementation principle of a method for testing link performance according to an embodiment of the present invention;
FIG. 2 is a system architecture diagram of a linkability performance test according to an embodiment of the invention;
FIG. 3 is a schematic diagram of the main steps of a method for testing the link performance according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the main modules of an apparatus for testing the link performance according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In order to solve the problems in the prior art, the invention provides a link performance testing scheme based on flow isolation, which can improve the efficiency of system performance testing. The method for testing the linkmzation performance uniformly sets the scope of the application to be tested as a test domain through the scope strategy of the network communication framework, thereby realizing the automatic isolation of the test flow and the production flow without configuring and restarting the system to generate a test link; marking of service data and test data is not needed to ensure that the test data does not pollute production data; and the production environment does not need to be copied, and the linkability performance test is carried out based on the online mirror image, so that the time cost for performance test preparation and the server cost are greatly saved. Meanwhile, the method for testing the linkmzation performance of the embodiment of the invention can also carry out unified monitoring on each application system in the test link, ensure the safety of the system and provide a basis for capacity evaluation. In addition, the method for testing the linkmzation performance of the embodiment of the invention is an automatic performance test, reduces manual intervention, prevents human errors, saves labor cost, can execute the on-line linkmzation performance test at any time and realizes the normalization of the performance test.
Companies typically have an internal unified network communication framework, which may be a standard network communication protocol or an encapsulated network communication protocol. By encapsulating the network communication protocol, the data connection between the two parties can be realized in an actual data communication system through different encryption modes of the protocol. Common encapsulated network communication protocols such as remote Procedure call (rpc) (remote Procedure call) framework, etc. Standard network communication protocols such as TCP/IP protocol, IPX/SPX protocol, NetBEUI protocol, etc.
The invention adds scope attribute in the network communication frame for flow isolation, and adds judgment to the scope in the data communication process, only the client and the server of the same scope can carry out data communication, otherwise, the error is reported. And the modification of the scope can be dynamically configured through the management center, so that the application does not need to be restarted. By identifying the scope set in the network communication framework, system research personnel can perform performance test without modifying business logic. The management center is configured to configure and manage all applications, and configuration information related to the applications, such as: scope attributes, IP (Internet Protocol, Protocol for interconnection between networks) addresses of machines deployed by the application, hardware information, and the like.
Fig. 1 is a schematic diagram illustrating an implementation principle of a method for testing link performance according to an embodiment of the present invention. Typically, one application may be deployed in an application cluster consisting of multiple machines, and likewise, more than one application may be deployed on a machine. Therefore, when the scope is set, the attribute value corresponding to the scope attribute includes two parts, namely the application identifier and the identifier of the machine where the application is deployed, and the scope of the corresponding application deployed on the corresponding machine, which is required for testing, is set as the test domain according to the application identifier and the identifier (for example, the IP address) of the machine where the application is deployed. The application identifier may uniquely identify an application, such as an application name or number; the machine identification may uniquely identify a machine, such as the machine's IP address, physical address (MAC address), or machine number.
As shown in FIG. 1, in this embodiment, the test program and the selected scope of the machine on which the application A and the application B are deployed are set to be the same scope (for example, a test scope); the scope of other systems which do not need to be tested, such as the online application and other unselected machines with the application A and the application B, is set to be the same scope (for example, a default domain), so that the test program in the test domain cannot perform data interaction with the application A or the application B in the default domain, and the online application in the default domain cannot perform data interaction with the application A or the application B in the test domain, thereby realizing traffic isolation.
Specifically, when the method for testing the link performance is used for testing the performance, firstly, applications and machine ranges participating in the test are set in a management center, the scope of the application participating in the test is set to be a unified test domain by selecting application identifiers participating in the test under the scope attribute and deploying machine identifiers of the applications, no machine needs to be offline, the applications of other scopes cannot be influenced, and test data cannot enter other scopes; then, performing a linkability performance test according to a set test scheme; and finally, after the performance test is finished, restoring the scope one key of the application and the corresponding machine in the test domain to the previous scope.
According to the technical scheme of the embodiment of the invention, when the linkability performance test is carried out, one test link can be set according to the requirement, and a plurality of test links can be set and the performance test can be carried out simultaneously. When a plurality of test links are required to be used for performance test at the same time, data isolation among the plurality of test links can be realized only by setting the scope of the application and the corresponding machine included in the different test links as different scopes, and the method is convenient, efficient and safe.
Fig. 2 is a schematic diagram of a system architecture for testing linkability performance according to an embodiment of the present invention. The system for testing the linkability can also monitor the test link system in a unified way. As shown in fig. 2, the system for testing linkability performance of the present invention mainly includes a management center, a monitoring center, a performance testing management center, a press, and a testing link composed of applications to be tested, such as application a, application B, and application C.
Through the management center, all application information of the current test link and machine information corresponding to the applications can be obtained in real time. The content of the application information and the Machine information to be acquired can be set by a tester, and the application information includes, but is not limited to, JVM (Java Virtual Machine) disk information, interface TPS (Transaction PerSecond, number of executed transactions per second), interface response time, and the like; the machine information includes, but is not limited to, utilization of a CPU (central processing Unit), a memory, a hard disk, a network, and the like.
Through the monitoring system, the state parameters of the applications and the machines can be collected in real time and fed back to the performance test management center.
The performance test management center can judge whether the test adjustment is needed according to the state threshold value set before the test and the state parameter fed back by the monitoring system. When the state parameter fed back by the monitoring system does not exceed the set state threshold, the test can be continued according to the previous test scheme, and the test adjustment can also be performed to generate a test adjustment task, for example: when step pressurization is carried out, whether the number of concurrent requests is continuously increased or the magnitude of the concurrent requests is increased is judged according to the state parameters fed back by the monitoring system and the set state threshold, if the number of concurrent requests is required to be increased or the magnitude of the concurrent requests is required to be increased, a corresponding test adjustment task is generated and sent to the press machine, and therefore the effectiveness and the safety of step pressurization are guaranteed; when the working state parameter fed back by the monitoring system exceeds the set state threshold value, an alarm can be sent out, test adjustment tasks for stopping the test or reducing the quantity of concurrent requests are generated, and then the generated test adjustment tasks are sent to the press machine to be executed. The set state threshold includes, for example: CPU utilization of 95%, memory utilization of 90%, and so on.
The press is used for generating the simulation test flow according to the test task or the test adjustment task sent by the performance test management center.
Fig. 3 is a schematic diagram of main steps of a method for testing the link performance according to an embodiment of the present invention. As shown in fig. 3, the method for testing link performance of the embodiment of the present invention mainly includes the following steps S301 to S303.
Step S301: generating a test link by setting applications to be tested to the same scope, wherein only the applications in the same scope can perform data communication;
step S302: using the test link to carry out performance test;
step S303: and after the test is finished, restoring the scope of the application to be tested.
According to the technical scheme of the invention, the scope of the application to be tested is set by adding the scope attribute in the network communication framework.
According to one embodiment of the invention, when the network communication framework is a standard network communication protocol, the scope attribute is added in the network communication framework by adding a customized scope field in a message body of the network communication protocol.
According to another embodiment of the invention, when the network communication framework is an encapsulated network communication protocol, the scope attribute is added to the network communication framework by adding a customized scope field to the encapsulated network communication protocol.
According to an embodiment of the invention, the attribute values of the scoped attributes include an application identification and an identification of the machine on which the application is deployed.
According to an embodiment of the present invention, the performing the performance test by using the test link may specifically include:
and acquiring the state parameters of the test link in real time, and judging whether test adjustment is needed or not according to the state parameters and a preset state threshold.
The method for testing the linkmzation performance of the invention can comprise the following steps:
step S1: preparing a performance test, constructing test data, designing a test scene and the like;
step S2: constructing a test link: selecting which machines of which applications need to be tested from the management center, and setting the machines as a unified scope;
step S3: setting a test scheme: setting an automatic performance test strategy such as a target TPS (Transaction Per Second, number of executed transactions Per Second), a target simulation request number, a step increase and decrease request number or a step increase and decrease request order of magnitude;
step S4: setting a monitoring strategy: setting strategies when the state parameters of monitoring indexes reach a certain threshold value, wherein the strategies include but are not limited to alarming, stopping testing, stopping continuously increasing the number of concurrent requests, reducing the number of concurrent requests and the like;
step S5: performing performance testing and monitoring in real time: performing a performance test according to the test scenario and the monitoring policy set in steps S3 and S4;
step S6: and (3) recovery of the test link: after the test is finished, restoring the scope of the application participating in the test to the previous scope in the management center in a one-key mode.
Fig. 4 is a schematic diagram of main blocks of an apparatus for testing link performance according to an embodiment of the present invention. As shown in fig. 4, the apparatus 400 for testing link performance according to the embodiment of the present invention mainly includes a link generation module 401, a performance test module 402, and a link recovery module 403.
The link generation module 401 is configured to set applications to be tested as the same scope to generate a test link, where only the applications in the same scope can perform data communication;
the performance testing module 402 is configured to perform a performance test using the test link;
the link recovery module 403 is used to restore the scope of the application to be tested after the test is completed.
According to an embodiment of the present invention, the apparatus 400 for testing link performance may further include an attribute setting module (not shown in the figure) configured to:
the scope of the application to be tested is set by adding the scope attribute in the network communication framework.
According to one embodiment of the invention, when the network communication framework is a standard network communication protocol, the scope attribute is added in the network communication framework by adding a customized scope field in a message body of the network communication protocol.
According to another embodiment of the invention, when the network communication framework is an encapsulated network communication protocol, the scope attribute is added to the network communication framework by adding a customized scope field to the encapsulated network communication protocol.
According to the technical scheme of the embodiment of the invention, the attribute value of the scope attribute comprises an application identifier and an identifier of a machine deployed by the application.
According to the technical solution of the present invention, the performance testing module 402 may further be configured to:
and acquiring the state parameters of the test link in real time, and judging whether test adjustment is needed or not according to the state parameters and a preset state threshold.
According to the technical scheme of the embodiment of the invention, the application to be tested is set as the same scope to generate the test link, the test link is used for performance test, and after the test is finished, the scope of the application to be tested is restored, so that the scope of the application to be tested is uniformly set as a test domain through the scope strategy of a network communication framework, the test flow and the production flow are automatically isolated, the time cost for preparing the performance test and the server cost are greatly saved, the efficiency of the system performance test is improved, and the link performance test is more convenient and safer. Meanwhile, the method for testing the linkmzation performance of the embodiment of the invention can also carry out unified monitoring on each application system in the test link, ensure the safety of the system and provide a basis for capacity evaluation. In addition, the method for testing the linkmzation performance of the embodiment of the invention is an automatic performance test, reduces manual intervention, prevents human errors, saves labor cost, can execute the on-line linkmzation performance test at any time and realizes the normalization of the performance test.
Fig. 5 illustrates an exemplary system architecture 500 to which the method for testing the linkmzation performance or the apparatus for testing the linkmzation performance of the embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for testing the link performance provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus for testing the link performance is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device or server implementing an embodiment of the invention is shown. The terminal device or the server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a link generation module, a performance test module, and a link recovery module. Where the names of these units or modules do not in some cases constitute a definition of the unit or module itself, for example, the link generation module may also be described as a "module for generating a test link by setting an application to be tested as the same scope".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: generating a test link by setting applications to be tested to the same scope, wherein only the applications in the same scope can perform data communication; performing a performance test using the test link; and after the test is finished, restoring the scope of the application to be tested.
According to the technical scheme of the embodiment of the invention, the application to be tested is set as the same scope to generate the test link, the test link is used for performance test, and after the test is finished, the scope of the application to be tested is restored, so that the scope of the application to be tested is uniformly set as a test domain through the scope strategy of a network communication framework, the test flow and the production flow are automatically isolated, the time cost for preparing the performance test and the server cost are greatly saved, the efficiency of the system performance test is improved, and the link performance test is more convenient and safer. Meanwhile, the method for testing the linkmzation performance of the embodiment of the invention can also carry out unified monitoring on each application system in the test link, ensure the safety of the system and provide a basis for capacity evaluation. In addition, the method for testing the linkmzation performance of the embodiment of the invention is an automatic performance test, reduces manual intervention, prevents human errors, saves labor cost, can execute the on-line linkmzation performance test at any time and realizes the normalization of the performance test.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method for testing link performance, comprising:
generating a test link by setting applications to be tested to the same scope, wherein only the applications in the same scope can perform data communication;
performing a performance test using the test link;
and after the test is finished, restoring the scope of the application to be tested.
2. The method of claim 1, further comprising:
the scope of the application to be tested is set by adding the scope attribute in the network communication framework.
3. The method of claim 2, wherein when the network communication framework is a standard network communication protocol, a scope attribute is added to the network communication framework by adding a custom scope field to a message body of the network communication protocol.
4. The method of claim 2, wherein when the network communication framework is an encapsulated network communication protocol, a scope attribute is added to the network communication framework by adding a custom scope field to the encapsulated network communication protocol.
5. The method of claim 3 or 4, wherein the attribute values of the scoped attributes comprise an application identification and an identification of a machine on which the application is deployed.
6. The method of claim 1, wherein performing performance testing using the test link comprises:
and acquiring the state parameters of the test link in real time, and judging whether test adjustment is needed or not according to the state parameters and a preset state threshold.
7. An apparatus for testing linkability, comprising:
the link generation module is used for generating a test link by setting the applications to be tested to be the same scope, wherein only the applications in the same scope can carry out data communication;
the performance testing module is used for performing performance testing by using the testing link;
and the link recovery module is used for restoring the scope of the application to be tested after the test is finished.
8. The apparatus of claim 7, further comprising an attribute setting module to:
the scope of the application to be tested is set by adding the scope attribute in the network communication framework.
9. The apparatus of claim 8, wherein when the network communication framework is a standard network communication protocol, a scope attribute is added to the network communication framework by adding a customized scope field to a message body of the network communication protocol.
10. The apparatus of claim 8, wherein when the network communication framework is an encapsulated network communication protocol, a scope attribute is added to the network communication framework by adding a custom scope field to the encapsulated network communication protocol.
11. The apparatus of claim 9 or 10, wherein the attribute values of the scoped attributes comprise an application identification and an identification of a machine on which the application is deployed.
12. The apparatus of claim 7, wherein the performance testing module is further configured to:
and acquiring the state parameters of the test link in real time, and judging whether test adjustment is needed or not according to the state parameters and a preset state threshold.
13. An electronic device for testing link performance, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201810840724.5A 2018-07-27 2018-07-27 Method and device for testing linkmzation performance Active CN110768855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810840724.5A CN110768855B (en) 2018-07-27 2018-07-27 Method and device for testing linkmzation performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810840724.5A CN110768855B (en) 2018-07-27 2018-07-27 Method and device for testing linkmzation performance

Publications (2)

Publication Number Publication Date
CN110768855A true CN110768855A (en) 2020-02-07
CN110768855B CN110768855B (en) 2022-12-02

Family

ID=69328004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810840724.5A Active CN110768855B (en) 2018-07-27 2018-07-27 Method and device for testing linkmzation performance

Country Status (1)

Country Link
CN (1) CN110768855B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315677A (en) * 2021-05-19 2021-08-27 湖南快乐阳光互动娱乐传媒有限公司 Mirror flow based pressure measurement method and device, storage medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639390A (en) * 2014-12-31 2015-05-20 曙光信息产业(北京)有限公司 Method and device for testing system
CN107404418A (en) * 2017-07-26 2017-11-28 百度在线网络技术(北京)有限公司 Internet product method of testing, device, equipment and storage medium
US20170366441A1 (en) * 2016-06-16 2017-12-21 Oracle International Corporation Transmitting test traffic on a communication link
CN107809350A (en) * 2017-10-09 2018-03-16 北京京东尚科信息技术有限公司 The method and apparatus for obtaining HTTP server performance data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639390A (en) * 2014-12-31 2015-05-20 曙光信息产业(北京)有限公司 Method and device for testing system
US20170366441A1 (en) * 2016-06-16 2017-12-21 Oracle International Corporation Transmitting test traffic on a communication link
CN107404418A (en) * 2017-07-26 2017-11-28 百度在线网络技术(北京)有限公司 Internet product method of testing, device, equipment and storage medium
CN107809350A (en) * 2017-10-09 2018-03-16 北京京东尚科信息技术有限公司 The method and apparatus for obtaining HTTP server performance data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315677A (en) * 2021-05-19 2021-08-27 湖南快乐阳光互动娱乐传媒有限公司 Mirror flow based pressure measurement method and device, storage medium and equipment

Also Published As

Publication number Publication date
CN110768855B (en) 2022-12-02

Similar Documents

Publication Publication Date Title
CN113742031B (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN107766509B (en) Method and device for static backup of webpage
CN111258627B (en) Interface document generation method and device
US20070115818A1 (en) Triggered notification
CN111277432A (en) Configuration information updating method and device, electronic equipment and storage medium
US10924590B1 (en) Virtual workspace experience visualization and optimization
CN111064626B (en) Configuration updating method, device, server and readable storage medium
WO2022062661A1 (en) Operation notification method and apparatus, and storage medium and electronic apparatus
CN110768855B (en) Method and device for testing linkmzation performance
CN115086347B (en) Data synchronization method, device, electronic equipment and storage medium
CN110019059B (en) Timing synchronization method and device
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN112131095B (en) Pressure testing method and device
CN112579447A (en) Browser testing method and device
CN113556370A (en) Service calling method and device
CN113434384A (en) Pressure testing method and device
CN105187244A (en) Access management system of digital communication equipment supporting multiple management modes
CN112559001A (en) Method and device for updating application
CN116662016B (en) Port switching method, device, computer equipment, storage medium and program product
CN113760886B (en) Method, apparatus, device and computer readable medium for providing data service
CN113760836B (en) Wide table calculation method and device
CN114500485A (en) Data processing method and device
CN115422012A (en) Data processing method and device, electronic equipment and computer readable medium

Legal Events

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