CN107566214A - A kind of performance test methods and device - Google Patents

A kind of performance test methods and device Download PDF

Info

Publication number
CN107566214A
CN107566214A CN201710755825.8A CN201710755825A CN107566214A CN 107566214 A CN107566214 A CN 107566214A CN 201710755825 A CN201710755825 A CN 201710755825A CN 107566214 A CN107566214 A CN 107566214A
Authority
CN
China
Prior art keywords
performance test
task
server cluster
pressure
server
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
CN201710755825.8A
Other languages
Chinese (zh)
Other versions
CN107566214B (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.)
Weimeng Chuangke Network Technology China Co Ltd
Original Assignee
Weimeng Chuangke Network Technology China 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 Weimeng Chuangke Network Technology China Co Ltd filed Critical Weimeng Chuangke Network Technology China Co Ltd
Priority to CN201710755825.8A priority Critical patent/CN107566214B/en
Publication of CN107566214A publication Critical patent/CN107566214A/en
Application granted granted Critical
Publication of CN107566214B publication Critical patent/CN107566214B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiments of the invention provide a kind of performance test methods and device, wherein, this method includes:Whether there is new event in monitoring event queue, wherein, the event queue is used for the event for having transmitted the change of pressure server cluster or the change of performance test task status;When occurring new event in monitoring the event queue, performance test assignment is obtained from task queue, and has distributed to pressure server cluster and has carried out performance test.The present invention solve in the presence of existing performance test mode in addition to needing method of testing and test data, also need to voluntarily configure the technical problem of pressure server, effective resource for having utilized pressure server is reached, efficiently to complete the technique effect of multiple performance test tasks.

Description

A kind of performance test methods and device
Technical field
The present invention relates to automatization testing technique field, more particularly to a kind of performance test methods and device.
Background technology
So-called performance test is exactly to simulate a variety of normal, peak values and abnormal load bar by the testing tool of automation Part, so as to test the property indices of system.At present, conventional performance testing tool (such as:tsung、 LoadRunner etc.) primarily to solving how to realize generation request, the problem of to generate test report.
However, existing performance testing tool and method of testing are primarily present following problem:
1) persistence is not carried out to caused test report, so that user needs voluntarily to complete multiple performance test Between report housekeeping, can not to performance test report effectively be managed, multiple performance test can not also be carried out Tracking;
2) when configuring performance test, how the pressure server that rises in test configurations needs user to be manually specified, and does not support point Cloth, if to support distribution, then need user's manual modification to configure when increasing machine or reducing machine, operate Come very cumbersome;
3) task scheduling can not be carried out to multiple performance test tasks simultaneously, has easily caused the resource wave of pressure server Take.
In view of the above-mentioned problems, not yet propose effective solution at present.
The content of the invention
The embodiment of the present invention provides a kind of performance test methods and device, so as to effectively utilize the money of pressure server Source, to complete multiple performance test tasks.
On the one hand, the embodiments of the invention provide a kind of performance test methods, including:Whether occur in monitoring event queue New event, wherein, the event queue is used to transmit the change of pressure server cluster or the change of performance test task status Event;
When occurring new event in monitoring the event queue, performance test assignment is obtained from task queue, and Distribute to pressure server cluster and carry out performance test.
Alternatively, when occurring new event in monitoring the event queue, performance test is obtained from task queue Task, and distributed to pressure server cluster and carried out performance test, including:One of highest priority is obtained from task queue Performance test task;The need of performance test task for pressing server cluster whether to disclosure satisfy that the highest priority are judged Ask;If it is satisfied, then the performance test task of the highest priority is distributed into the pressure server cluster that rises carries out performance Test;Otherwise, return in monitoring event queue and new event whether occur.
Alternatively, judge current idle plays whether pressure server cluster disclosure satisfy that the performance of the highest priority is surveyed The demand of trial business, including:The resource of the performance test task of the highest priority is obtained from performance test task list to be needed Ask;The resource requirement is substituted into the agreement consumption models pre-established, determines that the performance test of the highest priority is appointed Server resource amount needed for business;Pressed from pressed being obtained in server cluster table it is each in server cluster press server institute The idling-resource amount that can be provided;Judge the idling-resource amount sum that each pressure server can be provided, if more than etc. In the server resource amount of the performance test required by task of the highest priority;If so, then judge to press server set group energy Enough meet the demand of the performance test task of the highest priority, it is impossible to meet institute otherwise, it is determined that playing pressure server cluster State the demand of the performance test task of highest priority.
Alternatively, dispensing plays pressure server cluster and carries out performance test, including:Configuration file is generated, wherein, the configuration Rising and being undertaken in pressure server cluster needed for each pressure server for the task is carried in file;The configuration file is passed Deliver to described rise and press server cluster;Each pressure server in described pressure server cluster is according in the configuration file The performance test task undertaken needed for each pressure server of record, carries out performance test.
Alternatively, the event in the event queue includes at least one of:The dilatation of pressure server cluster is played, rises and forces to submit Business device cluster capacity reducing, newly-increased performance test task, performance test tasks carrying are completed.
Alternatively, after playing the performance test tasks carrying completion on pressure server, methods described also includes:Deposited in file Test result file caused by after storage performance test terminates in storage system.
Alternatively, the above method also includes:The heart that each pressure server timing is sent in pressure server cluster is received Hop-information;Server is pressed for not receiving rising for heartbeat message in scheduled time threshold value, this is risen to the registration of pressure server Information is arranged to fail, and otherwise, the log-on message for playing pressure server is effective;Wherein, log-on message forces to submit for rising for failure Business device will not be allocated performance test task;After performance test task has been distributed into pressure server cluster, this is risen and forced to submit The status information for playing pressure server that performance test task is assigned with business device cluster is arranged to carry out, and is assigned with performance test and is appointed Business rise pressure server on performance test tasks carrying complete after, by it is described be assigned with performance test task rise force business to submit The status information of device is arranged to idle.
On the other hand, the embodiments of the invention provide a kind of performance testing device, including:Monitoring modular, for monitoring thing Whether new event is occurred in part queue, wherein, the event queue is used to transmit the change of pressure server cluster or performance The event of test assignment state change;Test module, for when occurring new event in monitoring the event queue, from appointing It is engaged in obtaining performance test assignment in queue, and has distributed to pressure server cluster and carried out performance test.
Alternatively, the test module includes:Acquiring unit, one for the acquisition highest priority from task queue Performance test task;Judging unit, for having judged the performance for pressing server cluster whether to disclosure satisfy that the highest priority The demand of test assignment;Execution unit, for the demand in the performance test task for judging disclosure satisfy that the highest priority In the case of, the performance test task of the highest priority is distributed into the pressure server cluster that rises and carries out performance test; It is determined that in the case of it is impossible to meet the demand of the performance test task of the highest priority, return in monitoring event queue Whether new event is occurred.
Alternatively, judging unit includes:First obtains subelement, described preferential for being obtained from performance test task list The resource requirement of level highest performance test task;Determination subelement, for the resource requirement to be substituted into the association pre-established Consumption models are discussed, determine the server resource amount of the performance test required by task of the highest priority;Second obtains son list Member, for pressed from obtained in server cluster table press in server cluster it is each the idle money that can be provided of pressure server Measure in source;Judgment sub-unit, the idling-resource amount sum that can be provided for judging each pressure server, if more than etc. In the server resource amount of the performance test required by task of the highest priority;If so, then judge to press server set group energy Enough meet the demand of the performance test task of the highest priority, it is impossible to meet institute otherwise, it is determined that playing pressure server cluster State the demand of the performance test task of highest priority.
Above-mentioned technical proposal has the advantages that:, will in the case of it is determined that new event in event queue be present Performance test task in task queue has distributed to pressure server cluster and has carried out performance test, and business is forced to submit so as to realize The automatic distribution of device and the automatic of task issue, avoid in the presence of existing performance test mode except needing test side Outside method and test data, it is also necessary to voluntarily configured the technical problem of pressure server, reached effective utilized and pressed server Resource, efficiently to complete the technique effect of multiple performance test tasks.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of performance test methods according to embodiments of the present invention;
Fig. 2 is the structured flowchart of performance testing device according to embodiments of the present invention;
Fig. 3 is the configuration diagram of Performance Test System according to embodiments of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
In order to carry out apparent explanation to the application, some concept explanations being related to below to the application are as follows:
1) test configurations, specific method of testing in performance test, test data is may refer to and play pressure server configuration General name, performance testing tool generally according to test configurations carry out performance test.
2) play pressure server, may refer to it is actual produced to tested test system and send the server of request, for make by The server of test obtains sufficiently large request amount.
3) distributed platform, may refer to form the structure such as data storage, data analysis and calculating by multiple main frames Cluster software platform, in this example, distributed platform, which refers to, deploys the server cluster of performance test service.
4) agreement, tested communication convention between test system and its called side is may refer to, must be according to for called side About orienting the data of the tested corresponding form of system transmission could normally be communicated.
5) task scheduling, the task generation by platform courses is may refer in this example, and will be specific according to certain algorithm Pressure survey task distribute to the specific machine of platform and performed, a kind of behavior that last control task terminates.
6) front end machine, exposure http services is referred in this example, there is provided the service of data-interface and web page to user Device.
7) queue machine, the processor that respective operations are performed by reading the data in queue is referred in this example, not directly Exposure service, but rely on front end machine and data are write into queue.
In the embodiment of the present invention, it is proposed that a kind of performance test methods, as shown in figure 1, may include steps of:
Step 101:Whether there is new event in monitoring event queue, wherein, the event queue is used to transmit pressure Server cluster changes or the event of performance test task status change;
Wherein, the event stored in event queue can include but is not limited at least one of:Play pressure server cluster Whether capacity reducing, newly-increased performance test task, performance test tasks carrying are completed, i.e. can be to there is these new in detecting event queue Event occur, if so, so just triggering carry out task distribution, if it is not, continue to monitor, until discovery event queue In have new event.
Step 102:When occurring new event in monitoring the event queue, performance test is obtained from task queue Task, and distributed to pressure server cluster and carried out performance test.
When realizing, it is contemplated that can be according to the priority height of each task in task queue, to determine first to hold Row is which test assignment.I.e., it is possible to it is the high performance test task of priority treatment priority.Specifically, can be with task queue Priority and configuration information including performance test assignment;Accordingly, the one of highest priority can be obtained from task queue Individual performance test assignment;It is described excellent to have judged whether pressure server cluster disclosure satisfy that according to the configuration information of performance test task The demand of first level highest performance test task;If it is satisfied, then the performance test task of highest priority pressure is distributed into Server cluster carries out performance test;Otherwise, return in monitoring event queue and new event whether occur.That is, first processing is preferential Level highest task, but need to press the idling-resource amount in server cluster to disclosure satisfy that the performance test task in current rise In the case of demand.If can not meet, trigger timing next time can be waited, repeats and performs what is once judged and distribute Process, to realize the distribution of performance test assignment.
In order to realize to mission bit stream and rise the acquisition of pressure server info, performance test task list can be set and play pressure Server cluster table.Wherein, the information of performance test task is stored with the performance test task list, can specifically be included: Voluntary demand, submission time, submitter, configuration filename, test report name, report read right;Described pressure server cluster The information of each pressure server in pressure server cluster has been stored with table, can specifically have been included:Idle stock number (that is, when Before the stock number that can be provided), play the IP address of pressure server, for indicate pressure server whether believe by the registration of normal work Breath, for indicate pressure server whether the status information of execution performance test assignment.
Based on this, when realizing, whether can judge current idle in accordance with the following steps plays pressure server cluster It disclosure satisfy that the demand of the performance test task of the highest priority:
S1:The resource requirement of the performance test task of the highest priority is obtained from performance test task list;
S2:The resource requirement is substituted into the agreement consumption models pre-established, determines the property of the highest priority Server resource amount needed for energy test assignment;
S3:Pressed from pressed being obtained in server cluster table it is each in server cluster the sky that can be provided of pressure server Not busy stock number;
S4:Judge the idling-resource amount sum that each pressure server can be provided, if excellent more than or equal to described The server resource amount of first level highest performance test required by task;If so, then judge to press server cluster to disclosure satisfy that institute The demand of the performance test task of highest priority is stated, it is impossible to meet the priority otherwise, it is determined that playing pressure server cluster The demand of highest performance test task.
In order to realize the persistence to test result, after playing pressure server and carrying out performance test, can be deposited in file Test result file caused by after storage performance test terminates in storage system, so as to realize effective pipe to performance test report Reason.
In view of when realizing, sometimes some play pressure server and can go offline or break down, in order to can be with , can to avoid to the pressure server allocation performance test assignment that can not carry out normal performance test even if identifying this failure Pressure server is each played with setting requirements and periodically sends heartbeat message, for test control system or platform, Ke Yijie Receive the heartbeat message that each pressure server timing is sent;Pressed for not receiving rising for heartbeat message in scheduled time threshold value Server, the log-on message that this is risen to pressure server are arranged to fail, and otherwise, the log-on message for playing pressure server is effective; Wherein, log-on message presses server not to be allocated performance test task for rising for failure.
For it is above-mentioned play pressure server and for, can be with by the state for playing pressure server of allocated performance test task In being arranged to carry out, the state for playing pressure server that task has been completed could be arranged to the free time.
Can be first generation configuration text when test assignment has been distributed into pressure server cluster progress performance test Part, wherein, rising and being undertaken in pressure server cluster needed for each pressure server for the task can be carried in configuration file; Then configuration file pressure server cluster has been sent to so that playing pressure server cluster can be according to configuration file, progressive Can test.
Based on same inventive concept, a kind of performance testing device is additionally provided in the embodiment of the present invention, such as following implementation Described in example.It is similar to performance test methods to solve the principle of problem due to performance testing device, therefore the reality of performance testing device The implementation that may refer to performance test methods is applied, part is repeated and repeats no more.It is used below, term " unit " or " mould Block " can realize the combination of the software and/or hardware of predetermined function.Although the device described by following examples is preferably with soft Part is realized, but hardware, or software and hardware combination realization and may and be contemplated.Fig. 2 is of the invention real A kind of structured flowchart of the performance testing device of example is applied, as shown in Fig. 2 can include:Monitoring modular 201 and test module 202, The structure is illustrated below.
Monitoring modular 201, can be used for monitoring in event queue new event whether occur, wherein, the event queue For having transmitted the event of the change of pressure server cluster or the change of performance test task status;
Test module 202, it can be used for when occurring new event in monitoring the event queue, from task queue Performance test assignment is obtained, and has distributed to pressure server cluster and has carried out performance test.
In one embodiment, test module 202 can include:Acquiring unit, it is excellent for being obtained from task queue First one performance test assignment of level highest;Judging unit, for having judged it is described excellent whether pressure server cluster disclosure satisfy that The demand of first level highest performance test task;Execution unit, for disclosure satisfy that the performance of the highest priority in judgement In the case of the demand of test assignment, the performance test task of the highest priority is distributed into described rise and presses server cluster Carry out performance test;In the case where judging it is impossible to meet the demand of the performance test task of the highest priority, return Whether there is new event in monitoring event queue.
In one embodiment, judging unit can include:First obtains subelement, for from performance test task list The resource requirement of the middle performance test task for obtaining the highest priority;Determination subelement, for by the resource requirement generation Enter the agreement consumption models pre-established, determine the server resource of the performance test required by task of the highest priority Amount;Second obtain subelement, for from press server cluster table in obtain press server cluster in it is each pressure server The idling-resource amount that can be provided;Judgment sub-unit, the idling-resource that can be provided for judging each pressure server Measure sum, if more than or equal to the server resource amount of the performance test required by task of the highest priority;If so, then judge The demand that pressure server cluster disclosure satisfy that the performance test task of the highest priority is played, otherwise, it is determined that playing pressure server It is impossible to meet the demand of the performance test task of the highest priority for cluster.
In one embodiment, test module 202 can generate configuration file, wherein, carried in the configuration file There is rising and being undertaken in pressure server cluster needed for each pressure server for the task;The configuration file is sent to described rise Press server cluster;Described pressure server cluster carries out performance test according to the configuration file.
In one embodiment, the event in event queue can include but is not limited at least one of:Rise and force to submit The dilatation of business device cluster, play pressure server cluster capacity reducing, newly-increased performance test task, the completion of performance test tasks carrying.
In one embodiment, said apparatus can also include:Memory module, surveyed for playing the performance on pressure server After trying tasks carrying completion, caused test result file after storage performance test terminates in document storage system.
In one embodiment, said apparatus can also include:Receiving module, for having received in pressure server cluster The heartbeat message that each pressure server timing is sent;First setup module, for for not received in scheduled time threshold value Pressure server is played to heartbeat message, the log-on message that this is risen to pressure server is arranged to fail, and otherwise, this plays pressure server Log-on message is effective;Wherein, log-on message presses server not to be allocated performance test task for rising for failure;Second is set Module, after performance test task has been distributed into pressure server, the corresponding status information for playing pressure server is arranged to Perform, after playing the performance test tasks carrying completion on pressure server, the corresponding status information for playing pressure server is arranged to It is idle.
A kind of Performance Test System is additionally provided in embodiments of the present invention, can be included:Dispatch system front end machine, scheduling System queue machine and a pressure server, wherein:
System front end machine is dispatched, the interface of performance test task is created for providing, is risen on pressure server after the completion of task The interface adjusted back, the interface for checking form;
System queue machine is dispatched, for according to event queue and task queue, being pressed to rise in server-assignment task queue Performance test task, wherein, the event queue be used for has transmitted press server cluster change or performance test task shape The event of state change;
Pressure server is played, for performing the performance test task of distribution.
The above method is illustrated with reference to a specific embodiment, it is important to note, however, that the specific implementation Example does not form the improper restriction to the application merely to the application is better described.
Provide a kind of Performance Test System in this example, can with as shown in figure 3, including:Dispatch system front end machine, scheduling System queue machine, event queue, task queue, mysql storages, file storage and a pressure server, below to each composition portion Divide and be described as follows:
1) system front end machine is dispatched:For expose http interfaces, provide additions and deletions node interface, create task interface, Check the interface of form and rise and carry out the service of adjusting back etc. after the completion of task on pressure server.
2) event queue:The things such as the scalable appearance of cluster, newly-increased task, tasks carrying completion for having transmitted pressure server Part.
3) task queue:For transfer performance test assignment, can include:The priority of task and configuration information etc..
4) system queue machine is dispatched:Queue machine reads event from event queue, when occurred pressing server cluster dilatation, During the events such as newly-increased task, tasks carrying completion, a task scheduling is triggered, task scheduling obtains priority from task queue One task of highest, specifically configured further according to the situation and task of current vacant server, judge that current rise presses server The vacant resource of cluster is no to meet the needs of performance test task, if can not meet, Deng until event queue next time It is middle new event occur, if can meet, distribute server cluster task of pressing, and by the configuration file of task correlation The pressure server cluster from being handed down to scheduling system.
5) mysql is stored:Mysql, which can include performance test assignment table and rise, presses this two databases of server cluster table Table.Wherein, performance test task list is used for the information of storage performance test assignment, such as:Submission time, submitter, configuration text The attributes such as part name, test report name, report read right;Play the letter that pressure server cluster table is used to store pressure server cluster Breath, such as:The ip of server, server currently whether normal work, current whether in execution performance test assignment etc..
6) file stores:For storage performance system according to user to configuration file caused by the configuration of performance test and Performance test caused test result file after terminating.Wherein, promising is stored in configuration file and presses the various of server configuration Processing information, pressure server is played according to configuration file, carries out performance test.
7) pressure server is played, play pressure server regularly can send heartbeat to Performance Test System, not have when continuous 3 minutes During heartbeat, this plays pressure server and can be noted as failing, and rising for failure presses server not to be allocated performance test task.Do not lose Imitate and be not carried out rising for performance test task and press server, Performance Test System can be configured according to performance test and is allocated, so Mission dispatching is given to pressure server afterwards, and pressure server state will be played and be set in execution.After the completion of task, playing pressure server can To return to the performance test results to Performance Test System by callback interface, and this is risen and presses the state of server to put back into the free time.
In upper example, by by the data division of test and rise pressure a server resource separated, rise pressure server according to The agreement and performance parameter of performance test, realize that the automatic distribution of pressure server and the automatic of task issue, avoided tradition Performance testing tool is when configuring performance test in addition to needing method of testing and test data, it is also necessary to has voluntarily configured and has forced to submit The problem of business device, reduce the use cost of user.The scheduling feature of multitask is additionally provided in this example, supports multiple tasks simultaneously Distribute into, automatically configure function with reference to a pressure server, given full play to a performance for pressure server resource, reduced user Machine cost, and the test content and test report that can test simultaneously all properties of user carry out persistence, are The effective test data management function that user provides.By the way that same rise of the method for testing in test configurations and test data is forced to submit Separation between business device configuration, has realized automatically configuring for pressure server, and by the scheduling feature of multitask, improved The utilization rate of server resource is pressed, reduces the use cost and machine cost of user.
In upper example, in the case of it is determined that new event in event queue be present, by the performance test in task queue Task distributes to the current vacant pressure server that rises and carries out performance test, so as to realized the automatic distribution of pressure server and The automatic of task issues, avoid in the presence of existing performance test mode except needing method of testing and test data Outside, it is also necessary to voluntarily configured the technical problem of pressure server, reached effective resource for having utilized pressure server, with efficiently complete Into the technique effect of multiple performance test tasks.
Those skilled in the art will also be appreciated that the various illustrative components, blocks that the embodiment of the present invention is listed (illustrative logical block), unit, and step can pass through the knot of electronic hardware, computer software, or both Conjunction is realized.To clearly show that the replaceability of hardware and software (interchangeability), above-mentioned various explanations Property part (illustrative components), unit and step universally describe their function.Such work( Can be that specific application and the design requirement of whole system are depended on to realize by hardware or software.Those skilled in the art Various methods can be used to realize described function, but this realization is understood not to for every kind of specific application Beyond the scope of protection of the embodiment of the present invention.
Various illustrative logical blocks described in the embodiment of the present invention, or unit can by general processor, Digital signal processor, application specific integrated circuit (ASIC), field programmable gate array or other programmable logic devices, discrete gate Or the design of transistor logic, discrete hardware components, or any of the above described combination is come the function described by realizing or operate.General place It can be microprocessor to manage device, and alternatively, the general processor can also be any traditional processor, controller, microcontroller Device or state machine.Processor can also be realized by the combination of computing device, such as digital signal processor and microprocessor, Multi-microprocessor, one or more microprocessors combine a Digital Signal Processor Core, or any other like configuration To realize.
The step of method or algorithm described in the embodiment of the present invention can be directly embedded into hardware, computing device it is soft Part module or the combination of both.Software module can be stored in RAM memory, flash memory, ROM memory, EPROM storages Other any form of storaging mediums in device, eeprom memory, register, hard disk, moveable magnetic disc, CD-ROM or this area In.Exemplarily, storaging medium can be connected with processor, to allow processor to read information from storaging medium, and Write information can be deposited to storaging medium.Alternatively, storaging medium can also be integrated into processor.Processor and storaging medium can To be arranged in ASIC, ASIC can be arranged in user terminal.Alternatively, processor and storaging medium can also be arranged at use In different parts in the terminal of family.
In one or more exemplary designs, above-mentioned function described by the embodiment of the present invention can be in hardware, soft Part, firmware or any combination of this three are realized.If realized in software, these functions can store and computer-readable On medium, or with one or more instruction or code form be transmitted on the medium of computer-readable.Computer readable medium includes electricity Brain storaging medium and it is easy to so that allowing computer program to be transferred to other local telecommunication medias from a place.Storaging medium can be with It is that any general or special computer can be with the useable medium of access.For example, such computer readable media can include but It is not limited to RAM, ROM, EEPROM, CD-ROM or other optical disc storage, disk storage or other magnetic storage devices, or other What can be used for carrying or store with instruct or data structure and it is other can be by general or special computer or general or specially treated The medium of the program code of device reading form.In addition, any connection can be properly termed computer readable medium, example Such as, if software is to pass through a coaxial cable, fiber optic cables, double from a web-site, server or other remote resources Twisted wire, Digital Subscriber Line (DSL) or with defined in being also contained in of the wireless way for transmitting such as infrared, wireless and microwave In computer readable medium.Described disk (disk) and disk (disc) include Zip disk, radium-shine disk, CD, DVD, floppy disk And Blu-ray Disc, disk is generally with magnetic duplication data, and disk generally carries out optical reproduction data with laser.Combinations of the above It can also be included in computer readable medium.
Above-described embodiment, the purpose of the present invention, technical scheme and beneficial effect are carried out further Describe in detail, should be understood that the embodiment that the foregoing is only the present invention, be not intended to limit the present invention Protection domain, within the spirit and principles of the invention, any modification, equivalent substitution and improvements done etc., all should include Within protection scope of the present invention.

Claims (10)

  1. A kind of 1. performance test methods, it is characterised in that including:
    Whether there is new event in monitoring event queue, wherein, the event queue is used to transmit pressure server cluster change Change or the event of performance test task status change;
    When occurring new event in monitoring the event queue, performance test assignment is obtained from task queue, and distribute Performance test is carried out to pressure server cluster is played.
  2. 2. according to the method for claim 1, it is characterised in that occur new event in the event queue is monitored When, performance test assignment is obtained from task queue, and distributed to pressure server cluster and carried out performance test, including:
    A performance test assignment of highest priority is obtained from task queue;
    The demand of performance test task for pressing server cluster whether to disclosure satisfy that the highest priority is judged;
    If it is satisfied, then the performance test task of the highest priority is distributed into the pressure server cluster that rises carries out performance Test;Otherwise, return in monitoring event queue and new event whether occur.
  3. 3. according to the method for claim 2, it is characterised in that it is described excellent to have judged whether pressure server cluster disclosure satisfy that The demand of first level highest performance test task, including:
    The resource requirement of the performance test task of the highest priority is obtained from performance test task list;
    The resource requirement is substituted into the agreement consumption models pre-established, determines that the performance test of the highest priority is appointed Server resource amount needed for business;
    Pressed from pressed being obtained in server cluster table it is each in server cluster the idling-resource that can be provided of pressure server Amount;
    Judge the idling-resource amount sum that each pressure server can be provided, if more than or equal to the highest priority Performance test required by task server resource amount;If so, then judge to press server cluster to disclosure satisfy that the priority The demand of highest performance test task, otherwise, it is determined that playing pressure server cluster, it is impossible to meet the property of the highest priority The demand of energy test assignment.
  4. 4. according to the method for claim 3, it is characterised in that distributed to pressure server cluster and carried out performance test, bag Include:
    Configuration file is generated, wherein, described rise is recorded in the configuration file and presses each pressure server institute in server cluster The performance test task that need to be undertaken;
    The configuration file is sent to described rise and presses server cluster;
    Each pressure server in described pressure server cluster forces business to submit according to each recorded in the configuration file The performance test task undertaken needed for device, carry out performance test.
  5. 5. according to the method for claim 1, it is characterised in that event in the event queue include it is following at least it One:The dilatation of pressure server cluster is played, rises and presses server cluster capacity reducing, newly-increased performance test task, performance test tasks carrying complete Into.
  6. 6. according to the method for claim 1, it is characterised in that the performance test tasks carrying risen on pressure server cluster is complete Into afterwards, methods described also includes:
    Caused test result file after storage performance test terminates in document storage system.
  7. 7. according to the method for claim 6, it is characterised in that also include:
    The heartbeat message that each pressure server timing is sent in pressure server cluster is received;
    The log-on message for playing pressure server, this being risen to pressure server for not receiving heartbeat message in scheduled time threshold value It is arranged to fail, otherwise, the log-on message for playing pressure server is effective;Wherein, log-on message plays pressure server for failure Performance test task will not be allocated;
    After performance test task has been distributed into pressure server cluster, this is risen in pressure server cluster and is assigned with performance test The status information for playing pressure server of task is arranged to carry out, and the performance risen on pressure server for being assigned with performance test task is surveyed After trying tasks carrying completion, the status information for playing pressure server for being assigned with performance test task is arranged to idle.
  8. A kind of 8. performance testing device, it is characterised in that including:
    Monitoring modular, whether occur new event in event queue for monitoring, wherein, the event queue is used to transmit pressure Server cluster changes or the event of performance test task status change;
    Test module, for when occurring new event in monitoring the event queue, performance survey to be obtained from task queue Trial is engaged in, and has been distributed to pressure server cluster and carried out performance test.
  9. 9. device according to claim 8, it is characterised in that the test module includes:
    Acquiring unit, for obtaining a performance test assignment of highest priority from task queue;
    Judging unit, for having judged whether pressure server cluster disclosure satisfy that the performance test task of the highest priority Demand;
    Execution unit, will for it disclosure satisfy that the demand of performance test task of the highest priority in judgement in the case of The performance test task of the highest priority distributes to the pressure server cluster that rises and carries out performance test;Can not in judgement In the case of the demand of performance test task for meeting the highest priority, whether occur in return monitoring event queue new Event.
  10. 10. device according to claim 9, it is characterised in that the judging unit includes:
    First obtains subelement, the money of the performance test task for obtaining the highest priority from performance test task list Source demand;
    Determination subelement, for the resource requirement to be substituted into the agreement consumption models pre-established, determine the priority The server resource amount of highest performance test required by task;
    Second obtain subelement, for from press server cluster table in obtain press server cluster in it is each pressure server The idling-resource amount that can be provided;
    Judgment sub-unit, the idling-resource amount sum that can be provided for judging each pressure server, if more than etc. In the server resource amount of the performance test required by task of the highest priority;If so, then judge to press server set group energy Enough meet the demand of the performance test task of the highest priority, it is impossible to meet institute otherwise, it is determined that playing pressure server cluster State the demand of the performance test task of highest priority.
CN201710755825.8A 2017-08-29 2017-08-29 Performance test method and device Active CN107566214B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710755825.8A CN107566214B (en) 2017-08-29 2017-08-29 Performance test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710755825.8A CN107566214B (en) 2017-08-29 2017-08-29 Performance test method and device

Publications (2)

Publication Number Publication Date
CN107566214A true CN107566214A (en) 2018-01-09
CN107566214B CN107566214B (en) 2020-10-30

Family

ID=60977335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710755825.8A Active CN107566214B (en) 2017-08-29 2017-08-29 Performance test method and device

Country Status (1)

Country Link
CN (1) CN107566214B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800137A (en) * 2018-12-06 2019-05-24 珠海西山居互动娱乐科技有限公司 A kind of server performance test method and system
CN110321226A (en) * 2019-07-09 2019-10-11 西安点告网络科技有限公司 Automatic scalable appearance method, apparatus, host and the storage medium of host
CN110442508A (en) * 2018-05-03 2019-11-12 阿里巴巴集团控股有限公司 Test assignment processing method, device, equipment and medium
CN111193634A (en) * 2019-09-12 2020-05-22 腾讯科技(深圳)有限公司 Pressure testing method and device and computer readable storage medium
CN112398707A (en) * 2020-11-03 2021-02-23 平安普惠企业管理有限公司 Distributed automatic test management method, device, equipment and storage medium
CN113608842A (en) * 2021-09-30 2021-11-05 苏州浪潮智能科技有限公司 Container cluster and component management method, device, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6879811B1 (en) * 2001-12-31 2005-04-12 Bellsouth Intellectual Property Corp. System and method for providing cellular telephone service during cluster testing
CN103678133A (en) * 2013-12-18 2014-03-26 中国科学院深圳先进技术研究院 Task scheduling system for application software cloud testing
CN105404580A (en) * 2015-10-23 2016-03-16 努比亚技术有限公司 Distributed pressure test system and method
CN105786696A (en) * 2014-12-26 2016-07-20 阿里巴巴集团控股有限公司 Test method and device
CN106897207A (en) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 Ui testing method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6879811B1 (en) * 2001-12-31 2005-04-12 Bellsouth Intellectual Property Corp. System and method for providing cellular telephone service during cluster testing
CN103678133A (en) * 2013-12-18 2014-03-26 中国科学院深圳先进技术研究院 Task scheduling system for application software cloud testing
CN105786696A (en) * 2014-12-26 2016-07-20 阿里巴巴集团控股有限公司 Test method and device
CN105404580A (en) * 2015-10-23 2016-03-16 努比亚技术有限公司 Distributed pressure test system and method
CN106897207A (en) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 Ui testing method and apparatus

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442508A (en) * 2018-05-03 2019-11-12 阿里巴巴集团控股有限公司 Test assignment processing method, device, equipment and medium
CN110442508B (en) * 2018-05-03 2023-05-23 阿里巴巴集团控股有限公司 Test task processing method, device, equipment and medium
CN109800137A (en) * 2018-12-06 2019-05-24 珠海西山居互动娱乐科技有限公司 A kind of server performance test method and system
CN110321226A (en) * 2019-07-09 2019-10-11 西安点告网络科技有限公司 Automatic scalable appearance method, apparatus, host and the storage medium of host
CN111193634A (en) * 2019-09-12 2020-05-22 腾讯科技(深圳)有限公司 Pressure testing method and device and computer readable storage medium
CN111193634B (en) * 2019-09-12 2021-08-31 腾讯科技(深圳)有限公司 Pressure testing method and device and computer readable storage medium
CN112398707A (en) * 2020-11-03 2021-02-23 平安普惠企业管理有限公司 Distributed automatic test management method, device, equipment and storage medium
CN113608842A (en) * 2021-09-30 2021-11-05 苏州浪潮智能科技有限公司 Container cluster and component management method, device, system and storage medium

Also Published As

Publication number Publication date
CN107566214B (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN107566214A (en) A kind of performance test methods and device
CN112379995B (en) DAG-based unitized distributed scheduling system and method
CN105955824B (en) A kind of virtual resource configuration method and device
CN109412874B (en) Equipment resource configuration method, device, server and storage medium
CN110311831B (en) Container cloud-based system resource monitoring method and related equipment
CN108415847A (en) Performance test methods, device, computer equipment and storage medium
CN109936604A (en) A kind of resource regulating method, device and system
US20090187668A1 (en) Protocol Independent Server Replacement and Replication in a Storage Area Network
CN106713484A (en) Performance pressure measurement implementation method, system and server
CN104077212A (en) Pressure test system and method
CN106959895A (en) The resource regulating method and system of quick release thread
CN103631873B (en) A kind of data compression method and storage system
CN109218086B (en) Method and system for constructing switching network
CN110389843A (en) A kind of business scheduling method, device, equipment and readable storage medium storing program for executing
CN104850394B (en) The management method and distributed system of distributed application program
CN108683528A (en) A kind of data transmission method, central server, server and data transmission system
CN111160873A (en) Batch processing device and method based on distributed architecture
CN112445615A (en) Thread scheduling system, computer equipment and storage medium
CN104281489B (en) Multithreading requesting method and system under SOA framework
CN113742033A (en) Kubernetes cluster federal system and implementation method thereof
CN109597764A (en) A kind of test method and relevant apparatus of catalogue quota
CN114675956B (en) Method for configuration and scheduling of Pod between clusters based on Kubernetes
CN106888116A (en) A kind of dispatching method of dual controller cluster shared resource
CN109542627A (en) Node switching method, device, supervisor, node device and distributed system
CN106385330A (en) Network function virtualization composer realization method and device

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