CN109039819B - Time delay statistical method, device, system and storage medium - Google Patents

Time delay statistical method, device, system and storage medium Download PDF

Info

Publication number
CN109039819B
CN109039819B CN201810935627.4A CN201810935627A CN109039819B CN 109039819 B CN109039819 B CN 109039819B CN 201810935627 A CN201810935627 A CN 201810935627A CN 109039819 B CN109039819 B CN 109039819B
Authority
CN
China
Prior art keywords
time delay
distributed system
data
statistical
delay index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810935627.4A
Other languages
Chinese (zh)
Other versions
CN109039819A (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.)
SHENZHEN STOCK EXCHANGE
Original Assignee
Shenzhen Huarui Financial Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Huarui Financial Technology Co Ltd filed Critical Shenzhen Huarui Financial Technology Co Ltd
Priority to CN201810935627.4A priority Critical patent/CN109039819B/en
Publication of CN109039819A publication Critical patent/CN109039819A/en
Application granted granted Critical
Publication of CN109039819B publication Critical patent/CN109039819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0888Throughput

Abstract

The embodiment of the application discloses a time delay statistical method, a device, a system and a storage medium, wherein the method comprises the following steps: acquiring a data identifier of target data input to the distributed system; acquiring a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, wherein the application program is distributed at different nodes of the distributed system; generating time stamp information according to the data identification, the acquisition point identification and the time stamp; reading a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule; and based on the time delay index statistical rule, the time delay of the distributed system is counted according to the timestamp information. The time delay statistical method can realize automatic acquisition, measurement and statistics of time delay and throughput of a distributed system.

Description

Time delay statistical method, device, system and storage medium
Technical Field
the present application relates to the field of distributed system technologies, and in particular, to a method, an apparatus, a system, and a storage medium for time delay statistics.
Background
At present, a distributed system is developed rapidly because the problem of service carrying capacity of a middle-background IT system can be solved, and the distributed system refers to a software system which is deployed on a plurality of hosts (nodes, namely servers) and realizes specific functions through cooperative work of software programs. Latency is one of the important performance indicators for distributed systems. At present, a distributed system has no universal accurate time delay measurement and statistical method, and time delay is measured by adopting modes such as network packet capturing, log analysis and the like. The network packet capturing mode can only measure the time delay of network transmission and cannot measure the internal processing time delay of a program; meanwhile, the modes of network packet capturing, log analysis and the like occupy local system resources (CPU, memory, hard disk and the like) of distributed services, the processing capacity is limited, and the real-time measurement and statistics of the time delay of each message cannot be realized under high throughput pressure. Therefore, it is necessary to provide a delay statistical method to solve the above problems.
Disclosure of Invention
the application provides a time delay statistical method, a device, a system and a storage medium, so as to accurately and timely count the time delay of a distributed system.
The application provides a time delay statistical method, which comprises the following steps:
Acquiring a data identifier of target data input to the distributed system;
Acquiring a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, wherein the application program is distributed at different nodes of the distributed system;
generating time stamp information according to the data identification, the acquisition point identification and the time stamp;
Reading a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule;
And based on the time delay index statistical rule, the time delay of the distributed system is counted according to the timestamp information.
the application provides a time delay statistics device, it includes:
An identifier acquisition unit configured to acquire a data identifier of target data input to the distributed system;
The information acquisition unit is used for acquiring a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, and the application program is distributed in different nodes of the distributed system;
The information generating unit is used for generating time stamp information according to the data identification, the acquisition point identification and the time stamp;
The file reading unit is used for reading a time delay index configuration file, and the time delay index configuration file comprises a time delay index statistical rule;
And the time delay statistical unit is used for counting the time delay of the distributed system according to the timestamp information based on the time delay index statistical rule.
The present application further provides a distributed system, which includes a plurality of computer devices, where the computer devices include a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements any one of the steps of the latency statistical method provided in the present application when executing the computer program.
The present application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the latency statistics method according to any embodiment provided in the present application.
the embodiment of the application provides a time delay statistical method, a time delay statistical device, a time delay statistical system and a storage medium, wherein a data identifier of target data input to a distributed system is obtained; acquiring a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, wherein the application program is distributed at different nodes of the distributed system; generating time stamp information according to the data identification, the acquisition point identification and the time stamp; reading a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule; and based on the time delay index statistical rule, the time delay of the distributed system is counted according to the timestamp information. The time delay statistical method can realize automatic acquisition, measurement and statistics of time delay and throughput of a distributed system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
fig. 1 is a schematic block diagram of a distributed system according to an embodiment of the present disclosure;
Fig. 2 is a schematic flow chart of a latency statistics method according to an embodiment of the present application;
FIG. 3 is a schematic flow diagram of sub-steps of the latency statistics method of FIG. 2;
Fig. 4 is a schematic view of an application scenario of a latency statistics method according to an embodiment of the present application;
fig. 5 is a schematic flow chart of a latency statistics method according to another embodiment of the present application;
FIG. 6 is a schematic flow diagram of sub-steps of the latency statistics method of FIG. 5;
fig. 7 is a schematic block diagram of a latency statistic apparatus according to an embodiment of the present application;
Fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
it is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
it should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
the embodiment of the application provides a time delay statistical method, a time delay statistical device, a distributed system and a storage medium.
for convenience of understanding, the components of the distributed system to which the latency statistics method of the embodiment of the present application is applied will be described first. As shown in fig. 1, the distributed system includes a plurality of servers, also referred to as hosts. The server may be an independent server or a server cluster composed of a plurality of servers. The distributed system includes a software system in which application programs (software programs) deployed on a plurality of hosts cooperate to realize specific functions.
specifically, the method for implementing the time delay statistics in the distributed system includes that two types of software entities are jointly completed, and each type of software entity includes a time delay acquisition module and a time delay measurement component, wherein the time delay acquisition module is deployed in an application program of each host, and the time delay measurement component is deployed in one of the hosts or in a separate server. The time delay measurement assembly can be used for load segmentation according to the acquisition points, a plurality of time delay measurement assemblies are deployed according to data of the acquisition points, the acquisition points control the time delay acquisition module, the time delay measurement assemblies are respectively used for receiving data sent by different acquisition points, the data comprise timestamp information, and the time delay acquisition speed is improved through the method.
Referring to fig. 2, fig. 2 is a schematic flow chart of a delay statistics method according to an embodiment of the present application. The time delay statistical method is applied to the distributed system, as shown in fig. 1, and includes steps S101 to S105.
S101, acquiring a data identifier of target data input into the distributed system.
specifically, the time delay acquisition module acquires a data identifier of target data input to the distributed system. The target data is data input from the outside to the distributed system, and the data needs to be processed by an application program in a host of the distributed system, flows among the application programs, and is possible to generate external output. Each target data includes a data identifier, such as D1, D2... Dn, for identifying the target data, but may also be identified by other data identifiers, which is not limited herein.
s102, collecting a timestamp and a collection point identifier corresponding to a preset collection point of an application program when the target data is processed by the application program, wherein the application program is distributed in different nodes of the distributed system.
specifically, the time delay acquisition module acquires a timestamp and an acquisition point identifier corresponding to a preset acquisition point of the application program when the target data is processed by the application program. The preset acquisition points are a plurality of time acquisition points preset in the application program, and the time acquisition points are identified, for example, the application program 1 includes 100 time acquisition points, and the corresponding acquisition point identifications are T1 and T2.. T100, respectively. The identification may be performed in other ways, and is not limited herein.
And S103, generating time stamp information according to the data identification, the acquisition point identification and the time stamp.
Specifically, the time delay acquisition module generates time stamp information according to the data identifier, the acquisition point identifier and the time stamp, specifically packs the data identifier, the acquisition point identifier and the time stamp together into time stamp information, and sends the time stamp information to the time delay measurement component. The timestamp information is, for example: D1T 19: 30: 00.123456. D1 is a data identifier, T1 is an acquisition point identifier, and 9:30:00.123456 is a time stamp.
In an embodiment, after sending the timestamp information to the latency measurement component, the method further includes: and after receiving the timestamp information, the time delay measurement component correspondingly stores the timestamp in the timestamp information in a preset data table according to the data identifier and the acquisition point identifier so as to generate the timestamp information table.
Specifically, the time delay measurement component correspondingly stores the time stamp in a preset data table according to the data identifier and the collection point identifier to generate a time stamp information table, and the time stamp information table is specifically shown in table 1, so that data reading is facilitated.
TABLE 1 is a time stamp information Table
T1 T2 T3 T4
D1 9:30:00.123456 9:30:00.123478 9:30:00.126000 9:30:00.126456
D2 9:30:00.234567 9:30:00.234678 9:30:00.236000 9:30:00.236678
D3 …… …… …… ……
D4 …… …… …… ……
S104, reading a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule.
Specifically, the delay measurement component reads a delay index configuration file, where the delay index configuration file includes a delay index statistical rule. The statistical rule of the delay index is pre-configured in a server, and can be pre-configured in the server where the delay measurement component is located. And the time delay index statistical rule is a statistical rule of the distributed system according to the timestamp information.
For example, the delay measurement component continuously subtracts the end point time stamp and the start point time stamp in the time stamp information according to a predetermined statistical rule based on the time stamp information to obtain the delay index value of the data. Of course, other preset rules may be adopted to calculate various delay index values of different data. In addition, the delay measurement component can count various delay index values in a specified period, including percentage bit values such as an average value, a minimum value, a maximum value, 50%, 90%, 95%, 99% and the like, and also count the throughput rate of various delay acquisition points in the specified period.
and S105, counting the time delay of the distributed system according to the timestamp information based on the time delay index counting rule.
specifically, the delay measurement component counts the delay of the distributed system according to the timestamp information based on the delay index statistical rule. The delay index statistical rule includes a plurality of delay index calculation formulas, for example, a delay index obtained by subtracting the end point timestamp and the start point timestamp, and may also include percentile values such as an average value, a minimum value, a maximum value, 50%, 90%, 95%, and 99%.
Based on this, step S105 includes S1051 and S105 b. As shown in fig. 3, S105a, obtaining a calculation formula of the delay index in the statistical rule of the delay index; s105, 105b, calculating the time delay index corresponding to the timestamp information according to the time delay index calculation formula. From which various delay indicator data can be calculated.
In an embodiment, the timestamp information table includes a delay indicator bit, and after the time delay indicator corresponding to the timestamp information is calculated according to the time delay indicator calculation formula, the method further includes: and indexing the time delay index to a time delay index bit in the time stamp information table so as to store the time delay index in the time stamp information table. So as to view the delay index later or use the delay index to make drawing display.
Specifically, the delay index is stored in the timestamp information table and is represented as an information index table, as shown in table 2.
Table 2 is an information index table
Referring to fig. 4, fig. 4 is a schematic view of an application scenario of a latency statistics method according to an embodiment of the present application. Fig. 4 is a schematic view of a scenario of one of the hosts of the distributed system, where the host includes an application program, the latency acquisition template is deployed in the application program, the latency measurement component deployment server runs separately, and when target data is input to the application program of the distributed system from outside, the latency acquisition template acquires a data identifier of the target data input to the distributed system, such as a data identifier D1 or D2; when target data is acquired and processed by an application program, the target data passes through a timestamp and an acquisition point identifier corresponding to a preset acquisition point of the application program, where the acquisition point identifier is, for example: t1 and T2, corresponding timestamps are, for example: 9:30:00.123456 and 9:30: 00.123478; the time delay acquisition template generates time stamp information by using the data identification, the acquisition point identification and the time stamp according to the data identification, the acquisition point identification and the time stamp, and determines the acquisition point to send the time stamp information to a plurality of time delay acquisition components or one time delay acquisition component, so that the time delay processing speed is improved; and the time delay acquisition module reads a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule, and based on the time delay index statistical rule, the time delay of the distributed system is counted according to the timestamp information, and various time delay indexes are calculated for subsequent output and viewing.
In this embodiment, the delay statistical method obtains a data identifier of target data input to the distributed system; acquiring a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, wherein the application program is distributed at different nodes of the distributed system; generating time stamp information according to the data identification, the acquisition point identification and the time stamp; reading a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule; and based on the time delay index statistical rule, the time delay of the distributed system is counted according to the timestamp information. The time delay statistical method can realize automatic acquisition, measurement and statistics of time delay and throughput of a distributed system.
referring to fig. 5, fig. 5 is a schematic flowchart of a delay statistics method according to an embodiment of the present application. The delay statistical method is applied to the distributed system, as shown in fig. 5, and includes steps S201 to S208.
s201, screening out sample data input to the distributed system according to a preset screening rule.
Step S201 includes a step of data screening, as shown in fig. 6, the step specifically includes the following steps: s201a, counting the data input into the distributed system according to a preset counter; s201b, judging whether the number of counts corresponding to the counts meets a preset condition; s201c, if the counting number meets the preset condition, determining that the data corresponding to the counting number is the sample data input into the distributed system.
Specifically, a counter is set in advance in an application program, and a calculation flag is made on data input to the distributed system by the counter. And judging whether the counting number corresponding to the counting meets a preset condition. For example, the calculation number is modulo 100, n is the count number, and the preset condition is satisfied when n% 100 is 0. For another example, the predetermined condition may be satisfied when the calculated number is an odd number or an even number. And if the counting number meets the preset condition, determining that the data corresponding to the counting number is the sample data input into the distributed system. The time delay statistics and measurement can be selectively carried out on partial data through the data screening step, and resource waste caused by excessive data acquisition is avoided.
Of course, in other embodiments, the data may be filtered in other ways, such as by specifying that certain data be collected.
S202, setting the sample data as target data, and adding a data identifier in a message header of the target data.
specifically, the determined sample data is used as target data, and a data identifier is added to a message header of the target data, so that the data identifier of the target data input to the distributed system is acquired in step S103.
s203, acquiring a data identifier of the target data input to the distributed system.
specifically, the target data refers to data input from the outside to the distributed system, and the data needs to be processed by an application program in a host of the distributed system, flows between the application programs, and may be output to the outside, where each target data includes a data identifier.
S204, collecting a timestamp and a collection point identifier corresponding to a preset collection point of the application program when the target data is processed by the application program, wherein the application program is distributed in different nodes of the distributed system.
Specifically, the time delay acquisition module acquires a timestamp and an acquisition point identifier corresponding to a preset acquisition point of the application program when the target data is processed by the application program. The preset acquisition points are a plurality of time acquisition points which are preset in the application program and are identified.
and S205, generating time stamp information according to the data identifier, the acquisition point identifier and the time stamp.
Specifically, the time delay acquisition module generates time stamp information according to the data identifier, the acquisition point identifier and the time stamp, specifically packs the data identifier, the acquisition point identifier and the time stamp together into time stamp information, and sends the time stamp information to the time delay measurement component.
S206, reading a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule.
Specifically, the delay measurement component reads a delay index configuration file, where the delay index configuration file includes a delay index statistical rule. The statistical rule of the delay index is pre-configured in a server, and can be pre-configured in the server where the delay measurement component is located. And the time delay index statistical rule is a statistical rule of the distributed system according to the timestamp information.
And S207, based on the time delay index statistical rule, counting the time delay of the distributed system according to the time stamp information.
Specifically, the delay measurement component counts the delay of the distributed system according to the timestamp information based on the delay index statistical rule. The delay index statistical rule includes a plurality of delay index calculation formulas, for example, a delay index obtained by subtracting the end point timestamp and the start point timestamp, and may also include percentile values such as an average value, a minimum value, a maximum value, 50%, 90%, 95%, and 99%.
And S208, outputting and counting a statistical result corresponding to the time delay of the distributed system according to a preset output rule.
Specifically, the preset output rule is to output the statistical result according to a preset output form, where the preset output form includes three forms of output, which are: 1. rolling and outputting the statistical result to a command line console; 2. outputting the statistical result to a file, additionally recording the statistical value of each time delay index of each statistical period in the file, and also recording each time delay index value of each data; 3. the time delay measurement component is embedded with an Http server, can receive Http access requests from a browser or other programs, and returns the current statistical result to the visitor in the form of a Json character string according to the Http access requests.
Fig. 7 is a schematic block diagram of a latency statistic apparatus according to an embodiment of the present application. As shown in fig. 7, the present application also provides a delay statistics apparatus corresponding to the above delay statistics method. The delay statistics apparatus includes a unit for executing the delay statistics method, and the apparatus may be configured in a server.
as shown in fig. 7, the delay statistics apparatus 400 includes: the device comprises a data screening unit 401, an identification adding unit 402, an identification obtaining unit 403, an information collecting unit 404, an information generating unit 405, a file reading unit 406, a time delay counting unit 407 and a result output unit 408.
And the data screening unit 401 is configured to screen out sample data input to the distributed system according to a preset screening rule.
An identifier adding unit 402, configured to set the sample data as target data, and add a data identifier in a message header of the target data.
An identifier obtaining unit 403, configured to obtain a data identifier of the target data input to the distributed system.
an information acquisition unit 404, configured to acquire a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, where the application program is distributed in different nodes of the distributed system.
An information generating unit 405, configured to generate timestamp information according to the data identifier, the collection point identifier, and the timestamp.
A file reading unit 406, configured to read a delay indicator configuration file, where the delay indicator configuration file includes a delay indicator statistical rule.
And a time delay counting unit 407, configured to count, based on the time delay index counting rule, a time delay of the distributed system according to the timestamp information.
And a result output unit 408, configured to output a statistical result corresponding to the time delay of the distributed system according to a preset output rule.
it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the delay statistics apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above-described apparatus may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 8.
referring to fig. 8, fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 700 may be a server.
referring to fig. 8, the computer device 700 includes a processor 720, a memory, which may include a non-volatile storage medium 730 and an internal memory 740, and a network interface 750, which are connected by a system bus 710.
The non-volatile storage medium 730 may store an operating system 731 and computer programs 732. The computer program 732, when executed, may cause the processor 720 to perform any of the latency statistics.
The processor 720 is used to provide computing and control capabilities, supporting the operation of the overall computer device 700.
The internal memory 740 provides an environment for the execution of a computer program 732 in the non-volatile storage medium 730, and when executed by the processor 720, the computer program 732 may cause the processor 720 to perform any of the latency statistics methods.
The network interface 750 is used for network communication such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing device 700 to which the disclosed aspects apply, as a particular computing device 700 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. Wherein the processor 720 is configured to execute the program code stored in the memory to perform the following steps:
Acquiring a data identifier of target data input to the distributed system; acquiring a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, wherein the application program is distributed at different nodes of the distributed system; generating time stamp information according to the data identification, the acquisition point identification and the time stamp; reading a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule; and based on the time delay index statistical rule, the time delay of the distributed system is counted according to the timestamp information.
in one embodiment, the processor 720 is configured to execute the program code stored in the memory to perform the following steps before the obtaining of the data identifier of the target data input to the distributed system is performed:
Screening out sample data input to the distributed system according to a preset screening rule; setting the sample data as target data, and adding a data identifier in a message header of the target data.
in an embodiment, the processor 720 is configured to run a program code stored in a memory to realize the screening of the sample data input to the distributed system according to a preset screening rule, and specifically realize the following steps:
counting data input to the distributed system according to a preset counter; judging whether the counting number corresponding to the counting meets a preset condition or not; and if the counting number meets the preset condition, determining that the data corresponding to the counting number is the sample data input into the distributed system.
In an embodiment, the processor 720 is configured to run a program code stored in a memory to implement the statistical rule based on the delay indicator, and count the delay of the distributed system according to the timestamp information, and specifically implement the following steps:
Acquiring a time delay index calculation formula in the time delay index statistical rule; and calculating the time delay index corresponding to the timestamp information according to the time delay index calculation formula.
In an embodiment, the processor 720 is configured to run a program code stored in a memory to implement the following steps when generating the timestamp information according to the data identifier, the collection point identifier, and the timestamp:
And correspondingly storing the time stamp in a preset data table according to the data identifier and the acquisition point identifier to generate the time stamp information table.
In an embodiment, the processor 720 is configured to execute the program code stored in the memory to implement the statistical rule based on the latency indicator, and after the statistics of the latency of the distributed system according to the timestamp information, further implement the following steps:
And outputting and counting a statistical result corresponding to the time delay of the distributed system according to a preset output rule.
In an embodiment, when the processor 720 is configured to run the program code stored in the memory to implement the output of the statistical result corresponding to the time delay of the statistical distributed system according to the preset output rule, the following steps are specifically implemented:
And receiving an Http access request, and returning the statistical result in a Json character string form according to the Http access request.
It should be understood that, in the embodiment of the present Application, the Processor 720 may be a Central Processing Unit (CPU), and the Processor 720 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that the configuration of computer device 700 depicted in FIG. 8 is not intended to be limiting of computer device 700 and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. In the embodiment of the present invention, the computer program may be stored in a storage medium of a computer system and executed by at least one processor in the computer system to implement the flow steps of the embodiments including the methods as described above.
the computer readable storage medium may be a magnetic disk, an optical disk, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk or an optical disk, etc. which can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed latency statistic apparatus and method can be implemented in other ways. For example, the latency statistics embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
the integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A time delay statistical method is applied to a distributed system, and is characterized in that the method comprises the following steps:
Acquiring a data identifier of target data input to the distributed system;
Acquiring a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, wherein the application program is distributed at different nodes of the distributed system;
generating time stamp information according to the data identification, the acquisition point identification and the time stamp;
Reading a time delay index configuration file, wherein the time delay index configuration file comprises a time delay index statistical rule;
And based on the time delay index statistical rule, the time delay of the distributed system is counted according to the timestamp information.
2. The latency statistic method according to claim 1, wherein before obtaining the data identifier of the target data input to the distributed system, the latency statistic method comprises:
Screening out sample data input to the distributed system according to a preset screening rule;
Setting the sample data as target data, and adding a data identifier in a message header of the target data.
3. The latency statistic method according to claim 2, wherein the sample data input to the distributed system is filtered out according to a preset filtering rule;
Counting data input to the distributed system according to a preset counter;
Judging whether the counting number corresponding to the counting meets a preset condition or not;
and if the counting number meets the preset condition, determining that the data corresponding to the counting number is the sample data input into the distributed system.
4. The method according to claim 1, wherein the counting the delay of the distributed system according to the timestamp information based on the delay index counting rule includes:
Acquiring a time delay index calculation formula in the time delay index statistical rule;
And calculating the time delay index corresponding to the timestamp information according to the time delay index calculation formula.
5. The latency statistic method according to claim 1, wherein the generating timestamp information according to the data identifier, the collection point identifier and the timestamp comprises:
And correspondingly storing the time stamp in a preset data table according to the data identifier and the acquisition point identifier to generate the time stamp information table.
6. The latency statistic method according to claim 1, wherein after the statistics of the latency of the distributed system according to the timestamp information based on the latency indicator statistic rule, the method further comprises:
and outputting and counting a statistical result corresponding to the time delay of the distributed system according to a preset output rule.
7. the method according to claim 6, wherein the outputting the statistical result corresponding to the statistical of the delay of the distributed system according to the preset output rule comprises:
And receiving an Http access request, and returning the statistical result in a Json character string form according to the Http access request.
8. A latency statistic apparatus, comprising:
an identifier acquisition unit configured to acquire a data identifier of target data input to the distributed system;
the information acquisition unit is used for acquiring a timestamp and an acquisition point identifier corresponding to a preset acquisition point of an application program when the target data is processed by the application program, and the application program is distributed in different nodes of the distributed system;
The information generating unit is used for generating time stamp information according to the data identification, the acquisition point identification and the time stamp;
The file reading unit is used for reading a time delay index configuration file, and the time delay index configuration file comprises a time delay index statistical rule;
and the time delay statistical unit is used for counting the time delay of the distributed system according to the timestamp information based on the time delay index statistical rule.
9. A distributed system comprising a computer device including a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 7.
CN201810935627.4A 2018-08-16 2018-08-16 Time delay statistical method, device, system and storage medium Active CN109039819B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810935627.4A CN109039819B (en) 2018-08-16 2018-08-16 Time delay statistical method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810935627.4A CN109039819B (en) 2018-08-16 2018-08-16 Time delay statistical method, device, system and storage medium

Publications (2)

Publication Number Publication Date
CN109039819A CN109039819A (en) 2018-12-18
CN109039819B true CN109039819B (en) 2019-12-17

Family

ID=64630648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810935627.4A Active CN109039819B (en) 2018-08-16 2018-08-16 Time delay statistical method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN109039819B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111398610A (en) * 2019-01-02 2020-07-10 深圳迈瑞生物医疗电子股份有限公司 Sample turnaround time statistical method and device, sample analysis system and medium
CN109815102B (en) * 2019-01-21 2022-10-11 武汉斗鱼鱼乐网络科技有限公司 Test data statistical method, device and storage medium
CN110245051B (en) * 2019-06-14 2023-07-04 上海中通吉网络技术有限公司 Data embedding method, device, equipment and storage medium
CN110677312B (en) * 2019-08-15 2023-07-25 北京百度网讯科技有限公司 Time delay monitoring method and system for SDK (software development kit) package, computer equipment and readable medium
CN110730109A (en) * 2019-10-12 2020-01-24 北京百度网讯科技有限公司 Method and apparatus for generating information
CN112758132A (en) * 2021-01-08 2021-05-07 上海申铁信息工程有限公司 End-to-end time delay monitoring method and device for locomotive PHM system
CN113297037A (en) * 2021-07-27 2021-08-24 华锐分布式(北京)技术有限公司 Distributed system tracking monitoring method, system and medium
CN114025364A (en) * 2021-09-24 2022-02-08 重庆川仪自动化股份有限公司 Method and system for reducing communication delay based on conflict algorithm
CN115168080A (en) * 2022-09-08 2022-10-11 深圳华锐分布式技术股份有限公司 Distributed system time delay measurement method, device, equipment and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133829B (en) * 2013-12-18 2016-02-17 腾讯科技(深圳)有限公司 The method of monitoring business service data warehouse-in and relevant device and system
CN104730924A (en) * 2015-03-12 2015-06-24 上海交通大学 Multi-system tracking control method based on network communication
CN108255659B (en) * 2016-12-28 2021-06-29 平安科技(深圳)有限公司 Application program performance monitoring method and system
IT201700011928A1 (en) * 2017-02-03 2018-08-03 Jlg Group S R L METHOD FOR THE TRANSMISSION OF MULTIMEDIA DATA IN TELEMATIC SERVICES OF INSTANT MESSAGING FROM AND TO MOBILE DEVICES
CN107888690A (en) * 2017-11-17 2018-04-06 深圳泉眼体育运营管理有限公司 The statistical method and system of response time

Also Published As

Publication number Publication date
CN109039819A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109039819B (en) Time delay statistical method, device, system and storage medium
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
CN112235326B (en) Internet of things equipment data analysis method and device and electronic equipment
CN112311617A (en) Configured data monitoring and alarming method and system
CN105608517B (en) Business transaction performance management and visualization method and device based on flow
CN109327353B (en) Service flow determination method and device and electronic equipment
CN109597800B (en) Log distribution method and device
CN110516752A (en) Clustering cluster method for evaluating quality, device, equipment and storage medium
CN111061588A (en) Method and device for locating database abnormal source
CN109861843B (en) Method, device and equipment for completely collecting and confirming log files
CN113485931A (en) Test method, test device, electronic equipment and computer readable storage medium
CN113282460A (en) Distributed alarm system, method and device
CN110943887B (en) Probe scheduling method, device, equipment and storage medium
CN110138892B (en) Method and device for determining equipment regional information
CN110177075B (en) Abnormal access interception method, device, computer equipment and storage medium
CN110020166B (en) Data analysis method and related equipment
CN106681894B (en) Monitoring method and monitoring device of intelligent equipment
CN113965522B (en) Behavior log grouping method, device, storage medium and equipment
CN112764992B (en) Thread pool monitoring method, device and equipment
CN114816915A (en) Link tracking method and device
CN114422412B (en) Equipment detection method and device and communication equipment
CN111552566B (en) Data processing system, method, electronic equipment and storage medium
CN108805778B (en) Electronic device, method for collecting credit investigation data and storage medium
CN111159196A (en) Block chain data storage and acquisition method and device based on fragmentation
CN113905400B (en) Network optimization processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 2301, building 5, Shenzhen new generation industrial park, 136 Zhongkang Road, Meidu community, Meilin street, Futian District, Shenzhen, Guangdong 518000

Patentee after: SHENZHEN ARCHFORCE FINANCIAL TECHNOLOGY Co.,Ltd.

Address before: 603-604, block a, Tianjing building, Tian'an Digital City, Shatou street, Futian District, Shenzhen, Guangdong 518000

Patentee before: SHENZHEN ARCHFORCE FINANCIAL TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20210726

Address after: 518038 No. 2012, Shennan Avenue, Futian District, Lianhua street, Futian District, Shenzhen, Guangdong

Patentee after: SHENZHEN STOCK EXCHANGE

Address before: Room 2301, building 5, Shenzhen new generation industrial park, 136 Zhongkang Road, Meidu community, Meilin street, Futian District, Shenzhen, Guangdong 518000

Patentee before: SHENZHEN ARCHFORCE FINANCIAL TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right