[go: up one dir, main page]

CN105955872A - Server performance test method and system - Google Patents

Server performance test method and system Download PDF

Info

Publication number
CN105955872A
CN105955872A CN201610262646.6A CN201610262646A CN105955872A CN 105955872 A CN105955872 A CN 105955872A CN 201610262646 A CN201610262646 A CN 201610262646A CN 105955872 A CN105955872 A CN 105955872A
Authority
CN
China
Prior art keywords
service parameter
service
signature
parameters
parameter
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.)
Pending
Application number
CN201610262646.6A
Other languages
Chinese (zh)
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.)
Leshi Zhixin Electronic Technology Tianjin Co Ltd
LeTV Holding Beijing Co Ltd
Original Assignee
Leshi Zhixin Electronic Technology Tianjin Co Ltd
LeTV Holding Beijing 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 Leshi Zhixin Electronic Technology Tianjin Co Ltd, LeTV Holding Beijing Co Ltd filed Critical Leshi Zhixin Electronic Technology Tianjin Co Ltd
Priority to CN201610262646.6A priority Critical patent/CN105955872A/en
Publication of CN105955872A publication Critical patent/CN105955872A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

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

Abstract

An embodiment of the invention provides a server performance test method. The method comprises the steps of regularly generating a plurality of different signature parameters; allocating the different signature parameters to to-be-sent test access requests; and sending the test access requests to a server. An embodiment of the invention furthermore provides a server performance test system. By adding the different signature parameters into the to-be-sent test access requests, the diversity of the signature parameters contained in the test access requests is realized, requests of a large amount of real users are simulated, and high precision of a server performance test result is ensured.

Description

服务器性能测试方法及系统Server performance testing method and system

技术领域technical field

本发明实施例涉及测试技术领域,尤其涉及一种服务器性能测试方法及系统。The embodiments of the present invention relate to the technical field of testing, and in particular to a server performance testing method and system.

背景技术Background technique

为了占领市场,网络运营商会将良好的用户体验看做是部署服务器的一个重要考虑方面,在网络运营商部署服务器时,通常会将服务器的性能指标做为主要考虑因素,性能指标包含有最大并发请求数、响应时延等;其中,当服务器所接收处理的并发访问请求数超过上述最大并发请求数时,则会导致服务器的访问请求大量的失败响应服务,严重时甚至有可能造成服务器的宕机,故高精度的服务器性能指标的测试结果对于服务器的部署显得尤为重要。In order to occupy the market, network operators will regard good user experience as an important consideration for deploying servers. When deploying servers, network operators usually take the performance indicators of the servers as the main consideration. The performance indicators include the maximum concurrency The number of requests, response delay, etc. Among them, when the number of concurrent access requests received and processed by the server exceeds the above-mentioned maximum number of concurrent requests, it will cause a large number of server access requests to fail to respond to the service, and in severe cases, it may even cause server downtime Therefore, the test results of high-precision server performance indicators are particularly important for server deployment.

目前服务器性能测试常用的方案是:利用包含有参数生成器的测试装置模拟客户端向服务器发送包含有多种服务参数的访问请求,然后测试装置被动接收服务器所返回的数据,进而确定服务器的性能指标。应当解释的是,服务器签名安全机制是指在服务器工作运营以接收处理客户端的访问请求时,为了保证服务器的数据不会被窃取,客户端会针对访问请求中所包含的多种服务参数通过签名加密算法生成签名参数;然后服务器会对所接收到的访问请求中的签名参数进行校验,校验通过后才算符合服务器签名安全机制;伴随着网络运营商越来越重视服务器数据信息的安全度,具有签名安全机制的服务器的应用也越来越广泛,此种性能测试方案在现有技术范围下的应用也在逐渐缩小。At present, the commonly used solution for server performance testing is: using a test device containing a parameter generator to simulate the client sending an access request containing various service parameters to the server, and then the test device passively receives the data returned by the server to determine the performance of the server index. It should be explained that the server signature security mechanism means that when the server is working and operating to receive and process the client's access request, in order to ensure that the server's data will not be stolen, the client will pass a signature on various service parameters contained in the access request. The encryption algorithm generates signature parameters; then the server will verify the signature parameters in the received access request, and the server signature security mechanism will be considered only after the verification is passed; as network operators pay more and more attention to the security of server data information To a certain extent, the application of servers with signature security mechanisms is becoming more and more extensive, and the application of this kind of performance testing scheme in the scope of existing technologies is also gradually shrinking.

因此,如何简单有效地模拟大量真实用户的请求以获得高精度的服务器性能指标是目前业界亟待解决的技术难题之一。Therefore, how to simply and effectively simulate the requests of a large number of real users to obtain high-precision server performance indicators is one of the technical problems to be solved urgently in the industry.

发明内容Contents of the invention

本发明实施例提供一种服务器性能测试方法及系统,用以解决上述现有技术中所阐述的至少一个技术问题。Embodiments of the present invention provide a server performance testing method and system to solve at least one technical problem described in the above prior art.

一方面,本发明实施例提供了一种服务器性能测试方法,包括:On the one hand, the embodiment of the present invention provides a server performance testing method, comprising:

规律性地生成多个不同的签名参数;Regularly generate multiple different signature parameters;

将所述多个不同的签名参数分配给待发送的各个测试访问请求;assigning the plurality of different signature parameters to each test access request to be sent;

将所述各个测试访问请求发送至服务器。The respective test access requests are sent to the server.

另一方面,本发明实施例还提供了一种服务器性能测试系统,包括:On the other hand, the embodiment of the present invention also provides a server performance testing system, including:

签名参数生成单元,用于规律性地生成多个不同的签名参数;A signature parameter generating unit, configured to regularly generate a plurality of different signature parameters;

签名参数分配单元,用于将所述多个不同的签名参数分配给待发送的各个测试访问请求;a signature parameter allocation unit, configured to allocate the plurality of different signature parameters to each test access request to be sent;

发送单元,用于将所述各个测试访问请求发送至服务器。A sending unit, configured to send each of the test access requests to the server.

通过本发明实施例所提供的服务器性能测试方法及系统,通过将不同的签名参数添加至待发送的各测试访问请求中,实现了测试访问请求中所包含的签名参数的多样化,有效模拟了大量真实用户的请求,保障了服务器性能测试结果的高精确度。Through the server performance testing method and system provided by the embodiment of the present invention, by adding different signature parameters to each test access request to be sent, the diversification of the signature parameters contained in the test access request is realized, effectively simulating the A large number of real user requests ensure the high accuracy of server performance test results.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1示出的是本发明一实施例的服务器性能测试方法的流程图;What Fig. 1 shows is the flowchart of the server performance testing method of an embodiment of the present invention;

图2示出的是图1中的步骤S11的一种优选实施例的详细执行图;What Fig. 2 shows is a detailed execution diagram of a preferred embodiment of step S11 in Fig. 1;

图3示出的是本发明一实施例的服务器性能测试系统的结构示意图;What Fig. 3 shows is a schematic structural diagram of a server performance testing system according to an embodiment of the present invention;

图4示出的是图3中的签名参数生成单元的一种优选实施例的详细结构示意图。FIG. 4 shows a schematic diagram of a detailed structure of a preferred embodiment of the signature parameter generating unit in FIG. 3 .

具体实施方式detailed description

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

参见图1示出的是本发明一实施例的服务器性能测试方法的流程图,包括:Referring to Fig. 1, it is a flowchart of a server performance testing method according to an embodiment of the present invention, including:

S11:规律性地生成多个不同的签名参数;S11: Regularly generate multiple different signature parameters;

S12:将上述多个不同的签名参数分配给待发送的各个测试访问请求;S12: Allocate the above-mentioned multiple different signature parameters to each test access request to be sent;

S13:将上述各个测试访问请求发送至服务器。S13: Send each of the above test access requests to the server.

应当说明的是,服务参数为网络运营商自定义设定的特征参数,服务器利用访问请求中的服务参数能够找到相应的数据文件,例如在天气查询类的访问请求中,设定服务参数为北京、天津、沈阳等地域名称,则根据服务参数可以确定访问请求所对应的服务器中的有关北京、天津等地域的天气数据文件。It should be noted that the service parameter is a characteristic parameter customized by the network operator, and the server can find the corresponding data file by using the service parameter in the access request. For example, in the access request of weather query, set the service parameter as Beijing , Tianjin, Shenyang and other regional names, then the weather data files in the server corresponding to the access request can be determined according to the service parameters related to Beijing, Tianjin and other regions.

关于本发明实施例方法,更优化地,在步骤S13之后还包括:Regarding the method of the embodiment of the present invention, more optimally, after step S13, it also includes:

服务器响应执行测试访问请求;The server responds to the execution test access request;

根据已响应的访问请求的性能表现确定服务器的性能指标。Determine the server's performance metrics based on the performance of the responded access requests.

本发明实施例方法可应用在测试装置上。再者,上述优选实施例方法中的根据已响应的访问请求的性能表现确定服务器的性能指标包括:测试装置确定接收服务器所返回的访问请求为已响应的访问请求;根据测试装置发送至服务器的访问请求的总数和已响应的访问请求的数量确定服务器的最大并发请求数。The method of the embodiment of the present invention can be applied to a test device. Furthermore, determining the performance index of the server according to the performance of the responded access request in the method of the above-mentioned preferred embodiment includes: the test device determines that the access request returned by the receiving server is a responded access request; The total number of access requests and the number of responded access requests determine the maximum number of concurrent requests for the server.

通过本发明实施例所提供的服务器性能测试方法,通过将不同的签名参数添加至待发送的各测试访问请求中,实现了测试访问请求中所包含的签名参数的多样化,有效模拟了大量真实用户的请求;利用多个包含有不同签名参数的访问请求能有效降低服务器端的缓存机制对服务器性能测试结果的影响,大大提高了服务器性能指标的测试结果的精确度。Through the server performance testing method provided by the embodiment of the present invention, by adding different signature parameters to each test access request to be sent, the diversification of the signature parameters contained in the test access request is realized, effectively simulating a large number of real The user's request; using multiple access requests with different signature parameters can effectively reduce the impact of the server-side cache mechanism on the server performance test results, and greatly improve the accuracy of the test results of the server performance indicators.

参见图2示出的是图1中的步骤S11的一种具体实施例的详细执行图,其中,步骤S11包括:Referring to Fig. 2, it is a detailed execution diagram of a specific embodiment of step S11 in Fig. 1, wherein step S11 includes:

S111:根据多个服务参数生成服务参数列表;S111: Generate a service parameter list according to multiple service parameters;

S112:按照上述服务参数列表规律性地对其中所包含的服务参数进行签名加密以生成多个不同的签名参数。S112: Sign and encrypt the service parameters included in the service parameter list regularly according to the above service parameter list to generate multiple different signature parameters.

应当说明的是,测试装置配置有与服务器相匹配的签名加密算法;再者,上述服务参数列表可以存储于测试装置本地中也可以不存储于测试装置本地中,当测试装置需要调用服务参数以生成签名参数时,查询上述服务参数列表以获取相应的服务参数。It should be noted that the test device is configured with a signature encryption algorithm that matches the server; moreover, the above-mentioned service parameter list may or may not be stored locally in the test device. When the test device needs to call the service parameters to When generating signature parameters, query the above service parameter list to obtain the corresponding service parameters.

通过本发明优选实施例方法,利用符合服务器签名安全机制的服务参数所生成服务参数列表,能实现为不同的服务器定制服务参数列表以更好地模拟不同服务器的工作运行状态,增大了测试应用的灵活性;然后,利用服务参数列表能自动化生成多种签名参数,大大降低了服务器性能测试的成本,并提高了服务器性能测试的效率。Through the method of the preferred embodiment of the present invention, the service parameter list generated by using the service parameters conforming to the server signature security mechanism can realize the customization of the service parameter list for different servers to better simulate the working and running status of different servers, increasing the test application flexibility; then, using the service parameter list can automatically generate a variety of signature parameters, which greatly reduces the cost of server performance testing and improves the efficiency of server performance testing.

作为本发明实施例方法的一种优选实施例,图2中的步骤S112包括:As a preferred embodiment of the method in the embodiment of the present invention, step S112 in FIG. 2 includes:

根据服务器的应用场景,确定上述服务参数列表中各服务参数的比重;According to the application scenario of the server, determine the proportion of each service parameter in the above service parameter list;

按照上述比重,对服务参数列表中的各服务参数进行签名加密以生成多个不同的签名参数。According to the above ratio, the service parameters in the service parameter list are signed and encrypted to generate multiple different signature parameters.

应当说明的是,关于服务器的应用场景的确定,可以是通过对服务器所服务客户群体的分布特点,预测服务器所接收到的不同的服务参数各自所占的比重;关于服务器的应用场景的确定,也可以是通过定期查询服务器中的日志文件,并统计服务器中各数据文件的调用次数,进而根据各数据文件的调用次数确定上述各数据文件所对应的服务参数分别被调用的比重。It should be noted that the determination of the application scenario of the server can be based on the distribution characteristics of the customer groups served by the server, and the respective proportions of different service parameters received by the server can be predicted; the determination of the application scenario of the server, It is also possible to regularly query the log files in the server, and count the calling times of each data file in the server, and then determine the called proportions of the service parameters corresponding to the above data files according to the calling times of each data file.

通过本发明优选实施例方法,模拟服务器的应用场景对服务器进行性能测试,使得在测试状态的服务器所接收处理的访问请求中的服务参数与服务器在工作状态下相符,保障了所确定的服务器性能测试结果更加贴近真实应用场景下服务器的工作性能指标。Through the method of the preferred embodiment of the present invention, the application scene of the simulated server is used to test the performance of the server, so that the service parameters in the access request received and processed by the server in the test state are consistent with the server in the working state, and the determined server performance is guaranteed. The test results are closer to the performance indicators of servers in real application scenarios.

作为本发明实施例方法的一种优选实施例,图2中的步骤S112包括:As a preferred embodiment of the method in the embodiment of the present invention, step S112 in FIG. 2 includes:

选取服务参数列表中的第一服务参数进行签名加密以生成第一签名参数,并为上述第一服务参数添加标记;Selecting the first service parameter in the service parameter list to perform signature encryption to generate the first signature parameter, and adding a mark to the above-mentioned first service parameter;

选取服务参数列表中的第二服务参数进行签名加密以生成第二签名参数,其中,上述第二服务参数为服务参数列表中未添加有标记的服务参数。A second service parameter in the service parameter list is selected for signature encryption to generate a second signature parameter, wherein the above-mentioned second service parameter is a service parameter in the service parameter list that is not marked.

通过本发明优选实施例方法,通过标记服务参数列表中已被签名调用的服务参数能有效避免服务参数列表中同一服务参数被重复调用,有效避免了服务器中的同一数据文件被重复调用,从理论上消除了服务器端的缓存机制对服务器性能测试结果的影响,提高了服务器性能指标测试结果的精确度;并且,利用本优选实施例方法也可以实现顺序或随机不重复调用服务参数列表中的服务参数,可以实现模拟服务器在一定应用场景下大量真实用户的访问。Through the method of the preferred embodiment of the present invention, by marking the service parameters in the service parameter list that have been called by signature, it can effectively prevent the same service parameter in the service parameter list from being called repeatedly, and effectively avoid the same data file in the server from being called repeatedly. The influence of the caching mechanism on the server side on the server performance test results is eliminated, and the accuracy of the server performance index test results is improved; and the method of this preferred embodiment can also be used to implement sequential or random non-repetitive calls to the service parameters in the service parameter list , which can realize the access of a large number of real users in a simulated server under certain application scenarios.

作为本发明实施例方法的一种优选实施例,图2中的步骤S112包括:As a preferred embodiment of the method in the embodiment of the present invention, step S112 in FIG. 2 includes:

当服务参数列表中的服务参数均添加有标记时,清除服务参数列表中所有服务参数的标记,When the service parameters in the service parameter list are all marked, clear the marks of all service parameters in the service parameter list,

继续选取服务参数列表中的第一服务参数进行签名加密以生成第一签名参数,并为上述第一服务参数添加标记;Continue to select the first service parameter in the service parameter list to perform signature encryption to generate the first signature parameter, and add a mark to the above-mentioned first service parameter;

选取服务参数列表中的第二服务参数进行签名加密以生成第二签名参数,其中,上述第二服务参数为服务参数列表中未添加有标记的服务参数。A second service parameter in the service parameter list is selected for signature encryption to generate a second signature parameter, wherein the above-mentioned second service parameter is a service parameter in the service parameter list that is not marked.

通过本发明优选实施例方法,实现了利用服务参数列表中数量有限的服务参数,完成为所选取的大量测试访问请求中的每一测试访问请求所对应的服务参数添加标记;并且,利用标记清除机制,可以实现利用服务参数列表中有限的服务参数循环标记数量巨大的测试访问请求。Through the method of the preferred embodiment of the present invention, it is realized to use the limited number of service parameters in the service parameter list to add a mark to the service parameter corresponding to each test access request in a large number of selected test access requests; and, use the mark to clear The mechanism can realize the use of limited service parameters in the service parameter list to circularly mark a huge number of test access requests.

本发明实施例还提供一种具体实施例,具体包括:The embodiment of the present invention also provides a specific embodiment, specifically including:

首先,在测试装置配置有与服务器相匹配的签名加密算法,并在测试装置端配置一个服务参数列表city.xls,上述服务参数列表里边有10行数据,从第一行到第十行依次为北京、上海,南京,天津….沈阳,则服务参数即为各个城市的名称;First, the test device is configured with a signature encryption algorithm that matches the server, and a service parameter list city.xls is configured on the test device side. There are 10 rows of data in the above service parameter list, from the first row to the tenth row are For Beijing, Shanghai, Nanjing, Tianjin....Shenyang, the service parameter is the name of each city;

然后,当需要执行测试时,测试装置利用装饰配置从服务参数列表中获得城市参数,并且根据测试需要通过获取方式(sequential)和循环方式(iteration)来从服务参数列表中调取不同的参数;其中获取方式包含有顺序调用服务参数列表中的服务参数的方式、随机调用服务参数列表中的服务参数的方式和调用服务参数列表中唯一的服务参数的方式,循环方式包含有迭代循环方式;例如:顺序获取的方式是:为第1个访问请求取服务参数“北京”配置相应的签名参数,为第2个访问请求取服务参数“上海”配置相应的签名参数...为第10个访问请求取服务参数“沈阳”配置相应的签名参数;迭代循环方式就是上述顺序获取到第11个请求的时候就是返回服务参数列表第一行从“北京”循环取服务参数。随机获取的方式是乱序获取服务参数,例如为第1个待发送的测试访问请求取服务参数“天津”配置相应的签名参数,为第2个待发送的测试访问请求取服务参数“北京”配置相应的签名参数,为第10个待发送的测试访问请求取服务参数“南京”配置相应的签名参数;Then, when the test needs to be performed, the test device uses the decoration configuration to obtain the city parameters from the service parameter list, and calls different parameters from the service parameter list through sequential and iteration methods according to the test needs; The acquisition method includes the method of sequentially calling the service parameters in the service parameter list, the method of randomly calling the service parameters in the service parameter list, and the method of calling the only service parameter in the service parameter list, and the loop method includes the iterative loop method; for example : The method of sequential acquisition is: configure the corresponding signature parameters for the first access request to obtain the service parameter "Beijing", and configure the corresponding signature parameters for the second access request to obtain the service parameter "Shanghai"...for the tenth access Request the service parameter "Shenyang" to configure the corresponding signature parameters; the iterative loop method is that when the 11th request is obtained in the above sequence, the first line of the service parameter list is returned to obtain the service parameters from "Beijing". The method of random acquisition is to obtain service parameters in random order, for example, configure corresponding signature parameters for the first test access request to be sent with the service parameter "Tianjin", and for the second test access request to be sent with the service parameter "Beijing" Configure corresponding signature parameters, and configure corresponding signature parameters for the service parameter "Nanjing" of the 10th test access request to be sent;

关于上述获取方式(sequential)和循环方式(iteration)的选择,可以根据服务器的应用场景来确定与相应的服务参数的获取方式(sequential)和循环方式(iteration)。Regarding the selection of the acquisition mode (sequential) and the iteration mode (iteration), the acquisition mode (sequential) and the iteration mode (iteration) of the corresponding service parameters may be determined according to the application scenario of the server.

关于上述获取方式(sequential)和循环方式(iteration)的实现是通过为服务参数列表中已选取调用的服务参数打标记来实现的,更具体地,可以参照本发明具体实施例之前的相应的优选实施例方法的描述,故在此不加以赘述。The implementation of the above acquisition method (sequential) and iteration method (iteration) is realized by marking the service parameters that have been selected and called in the service parameter list. More specifically, you can refer to the corresponding optimization before the specific embodiments of the present invention The description of the method of the embodiment is not repeated here.

带有服务参数的访问请求是这样的www.le.com/weather/search?city=”北京”,其中“北京”就是服务参数,但是这样的请求是不安全的,服务器是拒绝执行的,故需要对服务参数用秘钥进行签名加密生成签名参数sign以待服务器识别执行。An access request with service parameters like this www.le.com/weather/search? city="Beijing", where "Beijing" is the service parameter, but such a request is not safe, and the server refuses to execute it, so the service parameter needs to be signed and encrypted with a secret key to generate a signature parameter sign for the server to identify and execute.

再者,因此在每次选取调用服务参数后,通过测试装置所配置的签名加密算法会自动签名生成签名参数,并相应地生成符合服务器的待发送的测试访问请求。更具体地,例如:上述顺序获取并迭代循环的方式使得多个待发送的测试访问请求就会变成:Furthermore, after each selection of calling service parameters, the signature encryption algorithm configured by the test device will automatically sign and generate signature parameters, and correspondingly generate a test access request that conforms to the server to be sent. More specifically, for example: the above method of sequential acquisition and iterative loop makes multiple test access requests to be sent become:

第1个:www.le.com/weather/search?city=”北京”&_sign=bb514eb64255ae1st: www.le.com/weather/search? city="Beijing"&_sign=bb514eb64255ae

第2个:www.le.com/weather/search?city=”上海”&_sign=sdfddeb64d5as2nd: www.le.com/weather/search? city="Shanghai"&_sign=sdfddeb64d5as

第10个:www.le.com/weather/search?city=”沈阳”&_sign=b44eb64259hhddNumber 10: www.le.com/weather/search? city="Shenyang"&_sign=b44eb64259hhdd

第11个:www.le.com/weather/search?city=”北京”&_sign=bb514eb64255aeNumber 11: www.le.com/weather/search? city="Beijing"&_sign=bb514eb64255ae

对上述包含有签名参数的测试访问请求发送至服务器,这样就可以在测试装置端获得服务器中所存储的关于不同城市的天气数据文件。The test access request including the signature parameters is sent to the server, so that the weather data files about different cities stored in the server can be obtained on the test device side.

最后,根据所获取的数据文件的性能表现确定服务器的性能指标。Finally, the performance index of the server is determined according to the performance of the acquired data files.

关于本具体实施例,应当解释的是,服务参数是利用装饰器从服务参数列表中所执行选取调用的。Regarding this specific embodiment, it should be explained that the service parameter is selected and called from the service parameter list by using the decorator.

通过本具体实施例,实现了在测试端自动化生成多个包含有不同的签名参数的测试访问请求,很好地模拟了多用户的访问请求,相应地确保了服务器性能测试结果的高精确度。Through this specific embodiment, it is realized that multiple test access requests containing different signature parameters are automatically generated at the test end, which well simulates multi-user access requests, and accordingly ensures high accuracy of server performance test results.

在本发明实施例方法一方面的应用上,本发明实施例方法可以应用在服务器性能测试领域,尤其是应用在与服务器相配套的测试装置上;通过本发明实施例方法可以实现测试访问请求中所包含的签名参数的多样化,简单有效模拟了大量真实用户的请求,并且能有效降低服务器端的缓存机制对服务器性能测试结果的影响,大大提高了服务器性能指标的测试结果的精确度。In one aspect of the application of the method of the embodiment of the present invention, the method of the embodiment of the present invention can be applied in the field of server performance testing, especially on the test device matched with the server; through the method of the embodiment of the present invention, the test access request can be implemented. The diversification of the included signature parameters can simply and effectively simulate the requests of a large number of real users, and can effectively reduce the impact of the server-side caching mechanism on the server performance test results, greatly improving the accuracy of the test results of the server performance indicators.

参见图3示出的是本发明一实施例的服务器性能测试系统的结构示意图,包括:Referring to Fig. 3, it is a schematic structural diagram of a server performance testing system according to an embodiment of the present invention, including:

签名参数生成单元,用于规律性地生成多个不同的签名参数;A signature parameter generating unit, configured to regularly generate a plurality of different signature parameters;

签名参数分配单元,用于将上述多个不同的签名参数分配给待发送的各个测试访问请求;A signature parameter allocation unit, configured to allocate the above-mentioned multiple different signature parameters to each test access request to be sent;

发送单元,用于将上述各个测试访问请求发送至服务器。A sending unit, configured to send each of the above test access requests to the server.

通过本发明实施例所提供的服务器性能测试系统,通过将不同的签名参数添加至待发送的各测试访问请求中,实现了测试访问请求中所包含的签名参数的多样化,有效模拟了大量真实用户的请求,保障了服务器性能测试结果的高精确度。Through the server performance testing system provided by the embodiment of the present invention, by adding different signature parameters to each test access request to be sent, the diversification of the signature parameters contained in the test access request is realized, effectively simulating a large number of real The user's request ensures the high accuracy of the server performance test results.

参见图4示出的是图3中的签名参数生成单元的一种优选实施例的详细结构示意图,签名参数生成单元包括:Referring to Fig. 4, it is a schematic diagram showing a detailed structure of a preferred embodiment of the signature parameter generation unit in Fig. 3, the signature parameter generation unit includes:

服务参数列表生成模块,用于根据多个服务参数生成服务参数列表;A service parameter list generating module, configured to generate a service parameter list according to multiple service parameters;

签名参数配置模块,用于按照上述服务参数列表规律性地对其中所包含的服务参数进行签名加密以生成多个不同的签名参数。The signature parameter configuration module is used to regularly sign and encrypt the service parameters included in the above service parameter list to generate multiple different signature parameters.

通过本发明优选实施例系统,利用符合服务器签名安全机制的服务参数所生成服务参数列表,能实现为不同的服务器定制服务参数列表以更好地模拟不同服务器的工作运行状态,增大了测试应用的灵活性;然后,利用服务参数列表能自动化生成多种签名参数,大大降低了服务器性能测试的成本,并提高了服务器性能测试的效率。Through the system of the preferred embodiment of the present invention, the service parameter list generated by using the service parameters conforming to the server signature security mechanism can realize the customization of the service parameter list for different servers to better simulate the working and running status of different servers, increasing the test application flexibility; then, using the service parameter list can automatically generate a variety of signature parameters, which greatly reduces the cost of server performance testing and improves the efficiency of server performance testing.

作为本发明实施例系统的一种优选实施例,签名参数配置模块用于根据服务器的应用场景,确定服务参数列表中各服务参数的比重,并按照上述比重,对服务参数列表中的各服务参数进行签名加密以生成多个不同的签名参数。As a preferred embodiment of the system in the embodiment of the present invention, the signature parameter configuration module is used to determine the proportion of each service parameter in the service parameter list according to the application scenario of the server, and according to the above-mentioned proportion, the signature parameter configuration module in the service parameter list Signature encryption is performed to generate several different signature parameters.

通过本发明优选实施例系统,模拟服务器的应用场景对服务器进行性能测试,使得在测试状态的服务器所接收处理的访问请求中的服务参数与服务器在工作状态下相符,保障了所确定的服务器性能测试结果更加贴近真实应用场景下服务器的工作性能指标。Through the system of the preferred embodiment of the present invention, the application scene of the simulated server is used to test the performance of the server, so that the service parameters in the access request received and processed by the server in the test state are consistent with the server in the working state, and the determined server performance is guaranteed. The test results are closer to the performance indicators of servers in real application scenarios.

作为本发明实施例系统的一种优选实施例,签名参数配置模块用于选取服务参数列表中的第一服务参数进行签名加密以生成第一签名参数,并为上述第一服务参数添加标记,并选取服务参数列表中的第二服务参数进行签名加密以生成第二签名参数,其中,上述第二服务参数为服务参数列表中未添加有标记的服务参数。As a preferred embodiment of the system in the embodiment of the present invention, the signature parameter configuration module is used to select the first service parameter in the service parameter list and perform signature encryption to generate the first signature parameter, and add a mark to the above-mentioned first service parameter, and A second service parameter in the service parameter list is selected for signature encryption to generate a second signature parameter, wherein the above-mentioned second service parameter is a service parameter in the service parameter list that is not marked.

通过本发明优选实施例系统,通过标记服务参数列表中已被签名调用的服务参数能有效避免服务参数列表中同一服务参数被重复调用,有效避免了服务器中的同一数据文件被重复调用,从理论上消除了服务器端的缓存机制对服务器性能测试结果的影响,提高了服务器性能指标测试结果的精确度;并且,利用本优选实施例系统也可以实现顺序或随机不重复调用服务参数列表中的服务参数,可以实现模拟服务器在一定应用场景下大量真实用户的访问。Through the system of the preferred embodiment of the present invention, by marking the service parameters in the service parameter list that have been called by signature, the same service parameter in the service parameter list can be effectively prevented from being called repeatedly, and the same data file in the server is effectively prevented from being called repeatedly. The influence of the caching mechanism on the server side on the server performance test results has been eliminated, and the accuracy of the server performance index test results has been improved; and, the system of this preferred embodiment can also realize sequential or random non-repetitive calls to the service parameters in the service parameter list , which can realize the access of a large number of real users in a simulated server under certain application scenarios.

作为本发明实施例系统的一种优选实施例,签名参数配置模块用于当服务参数列表中的服务参数均添加有标记时,清除服务参数列表中所有服务参数的标记,继续选取服务参数列表中的第一服务参数进行签名加密以生成第一签名参数,并为上述第一服务参数添加标记;选取服务参数列表中的第二服务参数进行签名加密以生成第二签名参数,其中,上述第二服务参数为所述服务参数列表中未添加有标记的服务参数。As a preferred embodiment of the system in the embodiment of the present invention, the signature parameter configuration module is used to clear the marks of all service parameters in the service parameter list when all service parameters in the service parameter list are marked, and continue to select the service parameters in the service parameter list. The first service parameter is signed and encrypted to generate the first signature parameter, and a mark is added to the first service parameter; the second service parameter in the service parameter list is selected to be signed and encrypted to generate the second signature parameter, wherein the second The service parameters are service parameters not marked in the service parameter list.

通过本发明优选实施例系统,实现了利用服务参数列表中数量有限的服务参数,完成为所选取的大量测试访问请求中的每一测试访问请求所对应的服务参数添加标记;并且,利用标记清除机制,可以实现利用服务参数列表中有限的服务参数循环标记数量巨大的测试访问请求。Through the system of the preferred embodiment of the present invention, it is realized to use the limited number of service parameters in the service parameter list to add a mark to the service parameter corresponding to each test access request in a large number of selected test access requests; and, use the mark to clear The mechanism can realize the use of limited service parameters in the service parameter list to circularly mark a huge number of test access requests.

在本发明实施例系统一方面的应用上,本发明实施例系统可以应用在服务器性能测试领域,尤其是搭建在与服务器相配套的测试装置上;通过本发明实施例系统可以实现测试访问请求中所包含的签名参数的多样化,简单有效模拟了大量真实用户的请求,并且能有效降低服务器端的缓存机制对服务器性能测试结果的影响,大大提高了服务器性能指标的测试结果的精确度。In one aspect of the application of the system of the embodiment of the present invention, the system of the embodiment of the present invention can be applied in the field of server performance testing, especially built on a test device matched with the server; through the system of the embodiment of the present invention, the system can realize the test access request The diversification of the included signature parameters can simply and effectively simulate the requests of a large number of real users, and can effectively reduce the impact of the server-side caching mechanism on the server performance test results, greatly improving the accuracy of the test results of the server performance indicators.

需要说明的是,在不冲突的情况下,本申请中的实施方式及实施方式中所涉及到的技术特征彼此之间可以相互组合。It should be noted that, in the case of no conflict, the implementation manners in the present application and the technical features involved in the implementation manners can be combined with each other.

本发明实施例中可以通过硬件处理器来实现相关功能模块和单元。In the embodiment of the present invention, relevant functional modules and units may be realized by a hardware processor.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative efforts.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the implementations, those skilled in the art can clearly understand that each implementation can be implemented by means of software plus a necessary general hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims (10)

1.一种服务器性能测试方法,包括:1. A server performance testing method, comprising: 规律性地生成多个不同的签名参数;Regularly generate multiple different signature parameters; 将所述多个不同的签名参数分配给待发送的各个测试访问请求;assigning the plurality of different signature parameters to each test access request to be sent; 将所述各个测试访问请求发送至服务器。The respective test access requests are sent to the server. 2.根据权利要求1所述的方法,其中,所述规律性地生成多个不同的签名参数包括:2. The method according to claim 1, wherein said regularly generating a plurality of different signature parameters comprises: 根据多个服务参数生成服务参数列表;Generate a service parameter list according to multiple service parameters; 按照所述服务参数列表规律性地对其中所包含的服务参数进行签名加密以生成多个不同的签名参数。According to the service parameter list, the service parameters contained therein are regularly signed and encrypted to generate a plurality of different signature parameters. 3.根据权利要求2所述的方法,其中,所述按照所述服务参数列表规律性地对其中所包含的服务参数进行签名加密以生成多个不同的签名参数包括:3. The method according to claim 2, wherein said regularly signing and encrypting the service parameters contained therein according to the service parameter list to generate a plurality of different signature parameters comprises: 根据所述服务器的应用场景,确定所述服务参数列表中各服务参数的比重;Determine the proportion of each service parameter in the service parameter list according to the application scenario of the server; 按照所述比重,对所述服务参数列表中的各服务参数进行签名加密以生成多个不同的签名参数。According to the proportion, each service parameter in the service parameter list is signed and encrypted to generate a plurality of different signature parameters. 4.根据权利要求2所述的方法,其中,所述按照所述服务参数列表规律性地对其中的服务参数进行签名加密以生成多个不同的签名参数包括:4. The method according to claim 2, wherein said regularly signing and encrypting the service parameters in said service parameter list to generate a plurality of different signature parameters comprises: 选取所述服务参数列表中的第一服务参数进行签名加密以生成第一签名参数,并为所述第一服务参数添加标记;Selecting a first service parameter in the service parameter list to perform signature encryption to generate a first signature parameter, and adding a mark to the first service parameter; 选取所述服务参数列表中的第二服务参数进行签名加密以生成第二签名参数,其中,所述第二服务参数为所述服务参数列表中未添加有标记的服务参数。Selecting a second service parameter in the service parameter list to perform signature encryption to generate a second signature parameter, wherein the second service parameter is a service parameter in the service parameter list without a mark added. 5.根据权利要求4所述的方法,其中,所述按照所述服务参数列表规律性地对其中的服务参数进行签名加密以生成多个不同的签名参数包括:5. The method according to claim 4, wherein said regularly signing and encrypting the service parameters in said service parameter list to generate a plurality of different signature parameters comprises: 当所述服务参数列表中的服务参数均添加有标记时,清除所述服务参数列表中所有服务参数的标记,When all the service parameters in the service parameter list are marked, clear the marks of all the service parameters in the service parameter list, 继续选取所述服务参数列表中的第一服务参数进行签名加密以生成第一签名参数,并为所述第一服务参数添加标记;Continue to select the first service parameter in the service parameter list to perform signature encryption to generate the first signature parameter, and add a mark to the first service parameter; 选取所述服务参数列表中的第二服务参数进行签名加密以生成第二签名参数,其中,所述第二服务参数为所述服务参数列表中未添加有标记的服务参数。Selecting a second service parameter in the service parameter list and performing signature encryption to generate a second signature parameter, wherein the second service parameter is a service parameter in the service parameter list without a mark added. 6.一种服务器性能测试系统,包括:6. A server performance testing system, comprising: 签名参数生成单元,用于规律性地生成多个不同的签名参数;A signature parameter generating unit, configured to regularly generate a plurality of different signature parameters; 签名参数分配单元,用于将所述多个不同的签名参数分配给待发送的各个测试访问请求;a signature parameter allocation unit, configured to allocate the plurality of different signature parameters to each test access request to be sent; 发送单元,用于将所述各个测试访问请求发送至服务器。A sending unit, configured to send each of the test access requests to the server. 7.根据权利要求6所述的系统,其中,所述签名参数生成单元包括:7. The system according to claim 6, wherein the signature parameter generating unit comprises: 服务参数列表生成模块,用于根据多个服务参数生成服务参数列表;A service parameter list generating module, configured to generate a service parameter list according to multiple service parameters; 签名参数配置模块,用于按照所述服务参数列表规律性地对其中所包含的服务参数进行签名加密以生成多个不同的签名参数。The signature parameter configuration module is used to regularly sign and encrypt the service parameters included in the service parameter list to generate multiple different signature parameters. 8.根据权利要求7所述的系统,其中,所述签名参数配置模块用于根据所述服务器的应用场景,确定所述服务参数列表中各服务参数的比重,并按照所述比重,对所述服务参数列表中的各服务参数进行签名加密以生成多个不同的签名参数。8. The system according to claim 7, wherein the signature parameter configuration module is configured to determine the proportion of each service parameter in the service parameter list according to the application scenario of the server, and according to the proportion, set the Each service parameter in the above service parameter list is signed and encrypted to generate multiple different signature parameters. 9.根据权利要求7所述的系统,其中,所述签名参数配置模块用于选取所述服务参数列表中的第一服务参数进行签名加密以生成第一签名参数,并为所述第一服务参数添加标记,并选取所述服务参数列表中的第二服务参数进行签名加密以生成第二签名参数,其中,所述第二服务参数为所述服务参数列表中未添加有标记的服务参数。9. The system according to claim 7, wherein the signature parameter configuration module is configured to select a first service parameter in the service parameter list to perform signature encryption to generate a first signature parameter, and provide the first service parameter adding a mark to the parameter, and selecting a second service parameter in the service parameter list to perform signature encryption to generate a second signature parameter, wherein the second service parameter is a service parameter not marked in the service parameter list. 10.根据权利要求9所述的系统,其中,所述签名参数配置模块用于当所述服务参数列表中的服务参数均添加有标记时,清除所述服务参数列表中所有服务参数的标记,继续选取所述服务参数列表中的第一服务参数进行签名加密以生成第一签名参数,并为所述第一服务参数添加标记;选取所述服务参数列表中的第二服务参数进行签名加密以生成第二签名参数,其中,所述第二服务参数为所述服务参数列表中未添加有标记的服务参数。10. The system according to claim 9, wherein the signature parameter configuration module is configured to clear the marks of all service parameters in the service parameter list when all service parameters in the service parameter list are marked, Continue to select the first service parameter in the service parameter list for signature encryption to generate the first signature parameter, and add a mark for the first service parameter; select the second service parameter in the service parameter list for signature encryption to A second signature parameter is generated, wherein the second service parameter is a service parameter not marked in the service parameter list.
CN201610262646.6A 2016-04-25 2016-04-25 Server performance test method and system Pending CN105955872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610262646.6A CN105955872A (en) 2016-04-25 2016-04-25 Server performance test method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610262646.6A CN105955872A (en) 2016-04-25 2016-04-25 Server performance test method and system

Publications (1)

Publication Number Publication Date
CN105955872A true CN105955872A (en) 2016-09-21

Family

ID=56915354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610262646.6A Pending CN105955872A (en) 2016-04-25 2016-04-25 Server performance test method and system

Country Status (1)

Country Link
CN (1) CN105955872A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114448857A (en) * 2022-01-29 2022-05-06 北京字节跳动网络技术有限公司 Method, device, storage medium and system for processing Mock service
WO2022105591A1 (en) * 2020-11-20 2022-05-27 上海连尚网络科技有限公司 Cache server performance test method and apparatus, device, and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130179942A1 (en) * 2012-01-06 2013-07-11 Altec Lansing, Llc Consolidated data services apparatus and method
CN104243532A (en) * 2013-06-21 2014-12-24 鸿富锦精密工业(深圳)有限公司 Data access method and system
CN104852912A (en) * 2015-04-29 2015-08-19 中国互联网络信息中心 Domain name registration server performance testing system and domain name registration server performance testing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130179942A1 (en) * 2012-01-06 2013-07-11 Altec Lansing, Llc Consolidated data services apparatus and method
CN104243532A (en) * 2013-06-21 2014-12-24 鸿富锦精密工业(深圳)有限公司 Data access method and system
CN104852912A (en) * 2015-04-29 2015-08-19 中国互联网络信息中心 Domain name registration server performance testing system and domain name registration server performance testing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022105591A1 (en) * 2020-11-20 2022-05-27 上海连尚网络科技有限公司 Cache server performance test method and apparatus, device, and medium
CN114448857A (en) * 2022-01-29 2022-05-06 北京字节跳动网络技术有限公司 Method, device, storage medium and system for processing Mock service

Similar Documents

Publication Publication Date Title
US10785345B2 (en) Information processing method, client, server and computer-readable storage medium
CN107147501B (en) Time stamp processing method and device
CN104092811B (en) Mobile terminal information download method, system, terminal device and server
JP2013522795A (en) System and method for remote maintenance of client systems in electronic networks using software testing with virtual machines
CN109600366A (en) The method and device of protection user data privacy based on block chain
CN112163854B (en) Hierarchical public key searchable encryption method and system based on block chain
CN106911770A (en) A kind of data sharing method and system based on many cloud storages
Bermbach et al. Cloud federation: Effects of federated compute resources on quality of service and cost
CN110351364A (en) Date storage method, equipment and computer readable storage medium
CN110096551A (en) Credit data storage method, device, equipment and medium based on block chain
CN110493207A (en) A kind of data processing method, device, electronic equipment and storage medium
CN108563697A (en) A kind of data processing method, device and storage medium
CN112631550A (en) Block chain random number generation method, device, equipment and computer storage medium
CN113010897A (en) Cloud computing security management method and system
US20080148404A1 (en) Method, system, and program product for characterizing computer attackers
CN110351276A (en) Data processing method, equipment and computer readable storage medium
CN105809066B (en) Encrypted data storage method and terminal
CN105224541B (en) Uniqueness control method, information storage means and the device of data
CN105955872A (en) Server performance test method and system
CN110990790B (en) Data processing method and equipment
CN110515819A (en) Performance testing method, electronic equipment, scheduling system and medium
KR102166673B1 (en) Stress test method for test target server and block chain node
CN114390105B (en) Enterprise user distribution method and equipment based on test
CN110262892A (en) A kind of ticketing service dissemination method based on distributed storage data-link, device and data-link node
CN109698750A (en) Block generation method, device, equipment and the readable storage medium storing program for executing of block chain

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160921

WD01 Invention patent application deemed withdrawn after publication