Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The performance detection method provided by the application can be applied to an application environment shown in fig. 1, wherein a client side and a clock server communicate through a network. The clients may be, but are not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, and the clock server may be, but is not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail by examples and with reference to the accompanying drawings. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a flowchart of a performance detection method provided by an embodiment, and an execution subject of the method is the clock server in fig. 1, where the method relates to a specific process that the clock server detects a maximum load amount that can be borne by the clock server according to a clock synchronization request continuously sent by a client. As shown in fig. 2, the method includes:
s101, receiving at least one group of a plurality of clock synchronization requests.
The clock synchronization request is a message, and is used for time synchronization between the client and the clock server, and specifically may include: signal message Singling and delay request message delay_req, wherein the signal message Singling is a message which is sent to a clock server and requires clock synchronization when a client needs to perform clock synchronization, and is used for requesting a synchronization message Sync to the clock server; the delay request message delay_req is another message which is sent to the clock server and requires clock synchronization when the client receives the synchronization message Sync sent by the clock server, and is used for requesting the delay response message delay_resp to the clock server, so that the client can send the synchronization message Sync and the delay response message delay_resp according to the time of sending the signal message Singling and the delay request message delay_req.
In this embodiment, when performance of the clock server starts to be detected, the clock server receives at least one group of multiple clock synchronization requests, where the at least one group of multiple clock synchronization requests may be from one client or from multiple clients, and specifically, when the at least one group of multiple clock synchronization requests is from one client, the multiple clock synchronization requests of each group may be from different IP addresses in one client.
S102, when each clock synchronization request is received, sending a clock synchronization message to the client, and simultaneously monitoring the sending state of the clock synchronization message.
The clock synchronization message may specifically include: the method comprises the steps of synchronizing a message Sync and a delay response message delay_resp, wherein the synchronizing message Sync is a message which is sent to a client and used for clock synchronization when a clock server receives a signal message Singling sent by the client, and the synchronizing message Sync comprises a time stamp of a sending moment so as to inform the client of the time for sending the synchronizing message Sync; when the delay_resp is a delay_req sent by the client, the delay response message delay_resp is a message for clock synchronization sent to the client, and the delay response message delay_resp contains a time stamp of the sending time so as to inform the client of the time for sending the delay response message delay_resp. The sending state of the clock synchronization message indicates a state when the clock server sends the clock synchronization message, which may specifically include a normal state and an abnormal state, where the normal state indicates that the clock server normally sends the clock synchronization message to the client according to a preset specification and time, and the abnormal state indicates that the clock server fails to normally send the clock synchronization message to the client according to a preset specification time, for example, the clock server does not send the clock synchronization message to the client, or the time that the clock server sends exceeds an expected time, and the like.
In this embodiment, when the clock server receives the clock synchronization request sent by the client, on one hand, the clock server sends a corresponding clock synchronization packet to the client, and the clock synchronization packet includes a timestamp of the clock synchronization packet sent by the clock server, so that the client can calculate the synchronization time according to the timestamp, so as to modify the local clock frequency, thereby synchronizing the time. On the other hand, each time the clock server transmits a clock synchronization message, it is necessary to monitor the transmission state of the clock synchronization message synchronously, so as to perform different operations according to different transmission states.
And S103, if the sending state of the clock synchronization message is monitored to be an abnormal state, determining that the sending time of the clock synchronization message in the abnormal state is the bottleneck time of the clock server.
The bottleneck time of the clock server represents a time point corresponding to the maximum load amount of the clock synchronization request which can be borne by the clock server.
The embodiment relates to a case that the sending state of a clock synchronization message is abnormal when the clock server monitors the sending state of the clock synchronization message, and under the application, the performance of each piece of hardware or software of the clock server is described to reach a use limit, so that the clock server cannot normally return the clock synchronization message to a client or return the clock synchronization message according to a specified time when receiving a clock synchronization request sent by the client, and the client cannot normally receive the clock synchronization message sent by the clock server, thereby the client cannot normally calculate the synchronization time or the calculated synchronization time is inaccurate, and the clock server and the client cannot normally perform time synchronization. Therefore, when the clock server detects that the sending state of the clock synchronization message is an abnormal state, the time of sending the clock synchronization message needs to be used as the bottleneck time of the clock server, so that subsequent operations can be performed later.
S104, determining the load quantity of the clock synchronization request which can be borne by the clock server according to the bottleneck moment.
In this embodiment, when the clock server obtains the bottleneck time, the relevant performance index of the clock server may be further recorded at the time point, where the performance index may be a performance indicating the synchronization time of the clock server, for example, a maximum load amount of a clock synchronization request that can be carried by the clock server, and may also be a performance indicating hardware or software of the clock server, for example, a CPU utilization rate, a hard disk utilization rate, and the like of the clock server. In this embodiment, the performance of the clock server in synchronizing time, that is, the maximum load amount of the clock synchronization request that can be borne by the clock server is reflected, and in testing, the number of clock synchronization requests received by the corresponding clock server at the bottleneck moment can be obtained by checking the local log record, that is, the maximum load amount.
The above embodiment provides a performance detecting method, by receiving at least one group of a plurality of clock synchronization requests; when each clock synchronization request is received, a clock synchronization message is sent to the client, and the sending state of the clock synchronization message is monitored at the same time; if the sending state of the clock synchronization message is monitored to be an abnormal state, determining that the sending time of the clock synchronization message in the abnormal state is the bottleneck time of the clock server; and determining the load quantity of the clock synchronization request which can be borne by the clock server according to the bottleneck moment. According to the detection method, the sending state of the clock synchronization message can directly reflect the load quantity of the clock synchronization request sent by the client side received by the clock server, when the monitored sending state is changed into an abnormal state, the performance of hardware or software of the clock server at the moment is in a bottleneck state and cannot work normally, and the load quantity of the clock synchronization request received by the clock server at the moment is the maximum load quantity of the clock synchronization request carried by the clock server. Therefore, the bottleneck test of the clock server is realized, the process is simple and practical, and the sending state of the clock synchronous message sent by the clock server only needs to be monitored in real time.
Based on the above embodiment, there is also an application scenario, that is, if the clock server monitors that the sending state of the clock synchronization packet is a normal state, the step S101 is executed again. The normal state refers to that when the clock server receives a clock synchronization request sent by the client, the clock server can normally return a clock synchronization message to the client within a preset specified time, so that the client can perform time synchronization according to the clock synchronization message. In this embodiment, if the clock server monitors that the sending state of the clock synchronization message is a normal state, the clock synchronization request message sent by the client is continuously received, and the sending state of the clock synchronization request is monitored in real time until the sending state of the clock synchronization message is detected to be changed into an abnormal state, which indicates that the clock server has reached the load limit that can be carried at this time, and then the measured relevant performance of the clock server is the bottleneck performance of the clock server.
Fig. 3 is a flowchart of another implementation manner of S102 in the embodiment of fig. 2, where the embodiment relates to a specific process of monitoring a state of a clock server itself when sending a clock synchronization message, and as shown in fig. 3, the "monitoring a sending state of a clock synchronization message" in S102 includes:
S201, monitoring whether the clock server sends a clock synchronization message, if the clock server sends the clock synchronization message, executing step S202, and if the clock server fails to send the clock synchronization message, executing step S203.
The embodiment relates to a method for determining a sending state of a clock synchronization message by a clock server through judging whether the clock server sends the clock synchronization message, which specifically comprises the following steps: after each clock synchronization request sent by the client is received by the clock server, a clock synchronization message corresponding to each clock synchronization request is correspondingly returned to the client, in the process, the clock server can check the log record of the clock server after each clock synchronization message is sent, monitor whether the clock server normally sends or not, if the clock server sends the clock synchronization message, follow-up steps are executed, namely, the follow-up steps are continued, if the clock server fails to send the clock synchronization message, the follow-up steps are executed, and the monitoring is stopped, so that the bottleneck performance of the clock server is obtained.
S202, determining the sending state of the clock synchronization message according to the time of the clock server sending the clock synchronization message.
The embodiment relates to a method for determining a sending state of a clock synchronization message by a clock server through judging time of the clock server sending the clock synchronization message, which specifically comprises the following steps: after receiving each clock synchronization request sent by the client, the clock server correspondingly returns a clock synchronization request message to the client, in the process, after each time the clock server sends the clock synchronization message, the clock server can check the log record of the clock server, monitor the time of the clock server sending each clock synchronization message, if the time of the clock server sending the clock synchronization message meets the actual application requirement, execute the subsequent steps, namely continue to monitor, and if the time of the clock server sending the clock synchronization message fails to meet the actual application requirement, measure the bottleneck performance of the clock server at the time.
S203, determining that the sending state of the clock synchronization message is an abnormal state.
When the clock server determines that the clock server fails to send the clock synchronization message based on S201, the sending state of the clock synchronization message is directly determined to be an abnormal state, and the abnormal state indicates that the performance of the hardware or software of the clock server at this time is already in a bottleneck state, so that the clock server fails to send the clock synchronization message to the client normally.
Fig. 4 is a flowchart of another implementation manner of S203 in the embodiment of fig. 3, where this embodiment relates to a specific process of detecting, by a clock server, a sending state of a clock synchronization message according to a time of sending the clock synchronization message, and as shown in fig. 4, S203 "determining, by the clock server, the sending state of the clock synchronization message" includes:
s301, monitoring time of the clock server to send the clock synchronization message, if the time is greater than a preset time threshold, executing step S302, and if the time is less than or equal to the preset time threshold, executing step S303.
The embodiment relates to a method for determining a sending state of a clock synchronization message by a clock server through judging the time of the clock server sending the clock synchronization message, which specifically comprises the following steps: after receiving each clock synchronization request sent by the client, the clock server correspondingly returns a clock synchronization message with each clock synchronization request to the client, in the process, after each time the clock server sends the clock synchronization message, the clock server can check the log record of the clock server, check the time for sending the clock synchronization message from the log record, and if the time for sending the clock synchronization message by the clock server is greater than a preset time threshold, the bottleneck performance of the clock server obtained at the time is measured. If the time of the clock server for sending the clock synchronization message is less than or equal to the preset time threshold, executing the subsequent steps, namely continuing to monitor.
S302, determining that the sending state of the clock synchronization message is an abnormal state.
When the clock server determines that the clock server fails to send the clock synchronization message according to the specified time based on S301, the sending state of the clock synchronization message is directly determined to be an abnormal state, and the abnormal state indicates that the performance of the hardware or software of the clock server at this time is already in a bottleneck state, so that the clock server fails to send the clock synchronization message to the client normally within the specified time.
S303, determining that the sending state of the clock synchronization message is a normal state.
When the clock server determines that the clock server can send the clock synchronization message according to the specified time based on S301, the sending state of the clock synchronization message is directly determined to be a normal state, and the performance of the hardware or software of the clock server at this time is described as being in a normal running state in the normal state, and the clock server can perform time synchronization with the client.
In the above embodiment, the clock server determines whether the sending state of the clock synchronization message is normal by determining the sending time of the clock synchronization message, so as to test each performance index of the clock server according to the sending state of the clock synchronization message. In the test method, the sending time of the clock synchronization message directly reflects the state of the clock server sending the clock synchronization message, and further indirectly reflects the load capacity of receiving the clock synchronization request, so that the test method can measure and obtain the maximum load capacity of the clock synchronization request borne by the clock server, and the method can be realized only by checking the log record of the clock server, so that the method is simple and practical.
Fig. 5 is a flowchart of another implementation manner of S102 in the embodiment of fig. 2, where the embodiment relates to a specific process of sending a clock synchronization message to a client by a clock server, as shown in fig. 5, in S102, "sending a clock synchronization message to a client when each clock synchronization request is received", where the method includes:
s401, when each clock synchronization request is received, a source IP address in the clock synchronization request is acquired.
In this embodiment, because the client may send clock synchronization requests of different source IP addresses, when the clock server receives multiple clock synchronization requests sent by the client, the clock server also needs to read the source IP address in each clock synchronization request, so that the clock server generates a corresponding clock synchronization message according to the respective source IP address.
S402, sending a clock synchronization message to the source IP address.
When the clock server obtains the source IP address in the clock synchronization request based on the S401, a corresponding clock synchronization message may be further generated according to the source IP address, and the generated clock synchronization message may be sent to the client where the source IP address is located, so that the client performs time synchronization according to the clock synchronization message.
The above-mentioned fig. 2-5 are steps of a method implemented at the clock server side, and the implementation procedure at the terminal side will be described below by taking fig. 6-7 as an example.
Fig. 6 is a flowchart of a performance detection method provided in an embodiment, where the execution subject of the method is the client in fig. 1, and the method relates to a specific process that the client sends a clock synchronization request to a clock server. As shown in fig. 6, the method includes:
s501, sending at least one group of a plurality of clock synchronization requests to a clock server; the clock synchronization requests for each group come from different IP addresses.
The embodiment corresponds to the step S101, and relates to an application scenario that the client simulates different IP addresses to send multiple sets of clock synchronization requests, and the specific simulation method is as follows: before the client sends a clock synchronization request to the clock server, the client generates a plurality of clock synchronization requests of a plurality of groups in advance according to a clock synchronization request template, and then sets a series of information related to the sent message, such as a sending interval, a sending period, a message identifier, a message serial number, a target IP address and the like of each group and each clock synchronization request. And then simulating to generate different IP addresses, and correlating each IP address with the message identification in each group of clock synchronization requests, so that the clock synchronization requests of different groups correspond to different IP addresses, and the clock server can return clock synchronization messages corresponding to the different IP addresses. After the client side completes the sending mode according to the process setting, at least one group of a plurality of clock synchronization requests can be sent to the clock server through different IP addresses, so that the clock server can receive the clock synchronization requests continuously sent by the client side, and the maximum load quantity of the clock synchronization requests borne by the clock server can be tested. It should be noted that, the client may send multiple sets of clock synchronization requests to the clock server concurrently, or alternatively, may send multiple sets of clock synchronization requests to the clock server according to a certain time sequence, which is not limited in this embodiment. Accordingly, the client may send multiple sets of clock synchronization requests periodically and simultaneously, or may send multiple sets of clock synchronization requests simultaneously at one time, which is not limited in this embodiment.
S502, receiving at least one group of a plurality of clock synchronization messages returned by the clock server.
The embodiment corresponds to the step S102, and relates to a case of receiving the clock synchronization message corresponding to the client when the clock server returns the clock synchronization message to the client. The manner in which the client receives the clock synchronization message corresponds to the manner in which the clock synchronization request was previously sent. When the client simulates a plurality of different IP addresses to send a clock synchronization request, the clock synchronization message returned by the clock server can be received through the plurality of different IP addresses, so that the client can perform time synchronization according to the clock synchronization messages received by the IP addresses.
S503, when receiving at least one group of a plurality of clock synchronization messages returned by the clock server, judging whether the cycle number is equal to a preset threshold, if not, executing step S504, and if so, executing step S505.
The cycle number is a transmission parameter defined by the client in advance according to the test requirement, and indicates the number of times of accumulatively transmitting at least one group of multiple clock synchronization requests when the client receives at least one group of multiple clock synchronization messages returned by the clock server.
The embodiment relates to a method that a client determines whether to stop testing by judging whether the cycle number reaches a preset cycle number, namely a preset threshold, in the process, if the detected cycle number reaches the preset threshold when the client receives at least one group of a plurality of clock synchronization messages returned by a clock server, the client is informed of finishing the load of a clock synchronization request which needs to be sent in the test, and at the moment, the client can stop testing or reset the cycle number to perform the next round of testing. If the cycle number does not reach the preset threshold, the client is not tested yet, and the clock synchronization request needs to be continuously sent to the clock server according to a preset sending mode.
S504, the step of sending at least one group of the plurality of clock synchronization requests to the clock server is continued to be performed.
This step is the case where the number of loops described above does not reach the preset threshold, and in this case, the client needs to continue the test, i.e. return to the previous step S501 and the following steps.
S505, stopping the test.
The step is that the number of the loops described above reaches the preset threshold, and in this case, the client may stop the test, or reset the number of loops according to the actual test requirement to perform the next round of test. When the number of cycles needs to be reset for testing, the IP address of the client for sending the clock synchronization request may be reconfigured, the clock synchronization request may be regenerated according to the clock synchronization request template, and then associated with the new IP address, and sent to the clock synchronization server.
In the above embodiment, the client sends at least one group of multiple clock synchronization requests to the clock server, receives at least one group of multiple clock synchronization messages returned by the clock server, and when receiving at least one group of multiple clock synchronization messages returned by the clock server, determines whether the cycle number is equal to a preset threshold, if the cycle number is equal to the preset threshold, stops the test, or resumes the test of the cycle number, and if the cycle number is not equal to the preset threshold, continues the test. The process can realize that the client simulates different application scenes according to actual test requirements, for example, different IP addresses, different transmission periods and different transmission time sequences. And then sending clock synchronization requests to the clock server according to different simulation scenes so as to realize performance test of the clock server under different application scenes, thereby improving test diversity and accuracy to a certain extent.
In practical application, the client can simulate various different testing scenarios according to practical application requirements, for example, the client can simulate several, tens or even hundreds of IP addresses and concurrently send clock synchronization requests to the clock server, so that the clock service request can receive a certain number of clock synchronization requests sent by a plurality of IP addresses, thereby testing the maximum load amount that the clock server can bear. Thus, the present application also provides a method for an IP address to emulate a plurality of IP addresses for sending clock synchronization requests, and this step is performed before the IP address sends a clock synchronization request to the clock server.
Based on the above description, in one embodiment, before the step S501 of sending at least one group of the plurality of clock synchronization requests to the clock server, as illustrated in fig. 7, the method further includes:
s601, randomly selecting at least one IP address.
In this embodiment, the process of configuring the IP address for the client to send the clock synchronization request may randomly select at least one IP address from the document in which the IP address is pre-recorded, or alternatively, may randomly generate at least one IP address, so that the client sends the clock synchronization request according to the at least one IP address.
S602, associating at least one IP address with at least one preset message identifier.
When the client obtains at least one IP address based on S601, the preset at least one packet identifier may be further associated with the at least one IP address, so that the client may send a clock synchronization request with the at least one packet identifier at a plurality of different IP addresses, or send the clock synchronization request in parallel, or send the clock synchronization request at a time sequence, or the like.
S603, generating at least one group of a plurality of clock synchronization requests by using a template of the clock synchronization requests according to the associated IP address and the message identification.
According to the message identification and the associated IP address configuration, the clock synchronization requests to be sent are configured, each group of the clock synchronization requests corresponds to one IP address and one message identification, and the clock synchronization requests of different groups correspond to different IP addresses and different message identifications respectively. In the actual configuration process, at least one group of a plurality of clock synchronization requests can be generated by using a clock synchronization request template, wherein the clock synchronization request template can be specifically a Signaling message template and a display_resp message template.
In summary, the present application also provides a performance detection method, which can be applied to the application system shown in fig. 1, and implements detection of various performance indexes of the clock server through data interaction between the client and the clock server in the system. As shown in fig. 8, the method includes:
s701, the client configures a plurality of IP addresses, and generates at least one group of a plurality of clock synchronization requests using a template of the clock synchronization requests.
S702, the client associates the message identifications in at least one group of a plurality of clock synchronization requests with a plurality of IP addresses one by one.
S703, the client sets a transmission mode for transmitting the clock synchronization request, wherein the transmission mode comprises a transmission interval and the number of cycles.
S704, the client transmits the generated at least one group of a plurality of clock synchronization requests to the clock server according to a preset transmission mode.
S705, the clock server receives at least one group of a plurality of clock synchronization requests sent by the client.
S706, when receiving each clock synchronization request, the clock server sends a clock synchronization message to the client, and monitors the sending state of the clock synchronization message.
Step S707, if the clock server monitors that the sending state of the clock synchronization message is an abnormal state, steps S708-S709 are executed, and if the clock server monitors that the sending state of the clock synchronization message is a normal state, step S705 is executed again.
S708, determining the sending time of the clock synchronization message in an abnormal state as the bottleneck time of the clock server.
S709, obtaining various performance indexes of the clock server at bottleneck time.
S710, the client receives at least one group of a plurality of clock synchronization messages returned by the clock server.
S711, when the client receives at least one group of a plurality of clock synchronization messages returned by the clock server, judging whether the cycle number is equal to a preset threshold, if the cycle number is smaller than the preset threshold, executing step S704, and if the cycle number is equal to the preset threshold, executing step S712.
S712, stopping the test or retesting.
It should be noted that, the process of data interaction between the client and the clock server, that is, the test process, can be executed based on the performance test script developed by the GCC platform, and the script has the advantages of high portability, low development difficulty and the like in terms of development, and has the advantages of simple operation platform, low occupancy rate and the like in terms of test, thereby reducing the test cost and improving the test efficiency. The performance test method provided by the application can meet the design under different scenes, and then the performance of the clock server is tested according to different scenes, so that the test diversity is increased.
It should be understood that, although the steps in the flowcharts of fig. 2-8 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-8 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence.
In one embodiment, as shown in fig. 9, there is provided a performance detecting apparatus including: a first receiving module 11, a monitoring module 12, a determining module 13 and an acquiring device 14, wherein:
a first receiving module 11 for receiving at least one group of a plurality of clock synchronization requests;
the monitoring module 12 is configured to send a clock synchronization message to a client when each clock synchronization request is received, and monitor a sending state of the clock synchronization message at the same time;
the determining module 13 is configured to determine, when it is monitored that the sending state of the clock synchronization packet is an abnormal state, that a sending time at which the clock synchronization packet in the abnormal state is located is a bottleneck time of the clock server;
and the obtaining device 14 is used for determining the load quantity of the clock synchronization request which can be carried by the clock server according to the bottleneck moment.
In one embodiment, as shown in fig. 10, there is provided a performance detecting apparatus, the apparatus further comprising: a return module 15, wherein:
and the return module 15 is configured to return to executing the step of receiving at least one group of the plurality of clock synchronization requests when it is detected that the sending state of the clock synchronization packet is a normal state.
In one embodiment, the monitoring module 12, as shown in fig. 11, includes:
a monitoring unit 121, configured to monitor whether the clock server sends the clock synchronization message;
and the determining unit 122 is configured to determine, when the clock server sends the clock synchronization message, a sending state of the clock synchronization message according to a time when the clock server sends the clock synchronization message, and determine, when the clock server fails to send the clock synchronization message, that the sending state of the clock synchronization message is the abnormal state.
In one embodiment, the determining unit 122 is specifically configured to monitor a time when the clock server sends the clock synchronization packet; if the time is greater than a preset time threshold, determining that the sending state of the clock synchronization message is the abnormal state; and if the time is smaller than or equal to the preset time threshold, determining that the sending state of the clock synchronization message is the normal state.
In one embodiment, the monitoring unit 121 is specifically configured to obtain, when each of the clock synchronization requests is received, a source IP address in the clock synchronization request; and the clock synchronization message is sent to the source IP address.
In one embodiment, as shown in fig. 12, there is provided a performance detecting apparatus including: a transmitting module 16, a second receiving module 17 and a judging module 18, wherein:
transmitting means 16 for transmitting at least one group of a plurality of clock synchronization requests to the clock server; the clock synchronization requests of each group come from different IP addresses;
second receiving means 17, configured to receive at least one group of a plurality of clock synchronization messages returned by the clock server;
a judging device 18, configured to, when receiving at least one group of multiple clock synchronization messages returned by the clock server, judge whether the cycle number is equal to a preset threshold, and if not, continue to return to executing the step of sending at least one group of multiple clock synchronization requests to the clock server; the cycle number represents the number of times that the client end transmits the at least one group of multiple clock synchronization requests in an accumulated way when receiving the at least one group of multiple clock synchronization messages returned by the clock server.
For specific limitations of the performance detection apparatus, reference may be made to the above limitation of a performance detection method, and no further description is given here. The various modules in the performance detection apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 13. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a performance detection method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 13 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
receiving at least one group of a plurality of clock synchronization requests;
when each clock synchronization request is received, sending a clock synchronization message to a client, and simultaneously monitoring the sending state of the clock synchronization message;
if the sending state of the clock synchronization message is monitored to be an abnormal state, determining that the sending time of the clock synchronization message in the abnormal state is the bottleneck time of the clock server;
and determining the load quantity of the clock synchronization request which can be borne by the clock server according to the bottleneck moment.
The computer device provided in the foregoing embodiments has similar implementation principles and technical effects to those of the foregoing method embodiments, and will not be described herein in detail.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
transmitting at least one group of a plurality of clock synchronization requests to a clock server; the clock synchronization requests of each group come from different IP addresses;
receiving at least one group of a plurality of clock synchronization messages returned by the clock server;
when at least one group of a plurality of clock synchronization messages returned by the clock server are received, judging whether the cycle number is equal to a preset threshold value, if not, continuing to execute the step of sending at least one group of a plurality of clock synchronization requests to the clock server; the cycle number represents the number of times that the client end transmits the at least one group of multiple clock synchronization requests in an accumulated way when receiving the at least one group of multiple clock synchronization messages returned by the clock server.
The computer device provided in the foregoing embodiments has similar implementation principles and technical effects to those of the foregoing method embodiments, and will not be described herein in detail.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor further performs the steps of:
Receiving at least one group of a plurality of clock synchronization requests;
when each clock synchronization request is received, sending a clock synchronization message to a client, and simultaneously monitoring the sending state of the clock synchronization message;
if the sending state of the clock synchronization message is monitored to be an abnormal state, determining that the sending time of the clock synchronization message in the abnormal state is the bottleneck time of the clock server;
and determining the load quantity of the clock synchronization request which can be borne by the clock server according to the bottleneck moment.
The foregoing embodiment provides a computer readable storage medium, which has similar principles and technical effects to those of the foregoing method embodiment, and will not be described herein.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor further performs the steps of:
transmitting at least one group of a plurality of clock synchronization requests to a clock server; the clock synchronization requests of each group come from different IP addresses;
receiving at least one group of a plurality of clock synchronization messages returned by the clock server;
when at least one group of a plurality of clock synchronization messages returned by the clock server are received, judging whether the cycle number is equal to a preset threshold value, if not, continuing to execute the step of sending at least one group of a plurality of clock synchronization requests to the clock server; the cycle number represents the number of times that the client end transmits the at least one group of multiple clock synchronization requests in an accumulated way when receiving the at least one group of multiple clock synchronization messages returned by the clock server.
The foregoing embodiment provides a computer readable storage medium, which has similar principles and technical effects to those of the foregoing method embodiment, and will not be described herein.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.