Performance analysis method, device, electronic equipment and medium
By setting a unified data protocol, parsing the log information of target data, and calculating preset indicator values, the problem of lack of versatility in existing performance analysis methods is solved, and higher versatility and consistency are achieved.
Patent Information
- Application Number
- CN202311507229.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-11-13
AI Technical Summary
Existing performance analysis methods lack versatility, resulting in the execution of each step being closely related to specific performance issues, making it difficult to adapt to the performance analysis needs of different target objects.
By setting a unified data protocol, the target data is obtained and its log information is parsed, and the preset indicator values are calculated for performance analysis to achieve the versatility of performance analysis.
The versatility of the performance analysis process is improved, making the calculation process and performance analysis more versatile and consistent, and applicable to a variety of target objects.
Smart Images

Figure CN117389854B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a performance analysis method, device, electronic device and medium. Background Art
[0002] As computer technology continues to develop, computing power of computing systems is becoming more and more powerful, while system complexity is also increasing. Therefore, evaluating and analyzing performance bottlenecks in these systems has become particularly important and urgent.
[0003] In the related art, when the performance analysis is performed on the target object in the system (such as hardware objects such as processors and accelerator cards, or software objects such as certain computing functions), the execution of each step in the analysis process is closely related to a specific performance problem. In other words, usually when a certain type of specific performance analysis is required for a specific target object, a set of performance analysis solutions is customized based on the specific needs of the performance analysis.
[0004] This results in a lack of generality in performance analysis solutions. Summary of the invention
[0005] In view of this, embodiments of the present application provide a performance analysis method, device, electronic device, and medium to improve the versatility of the performance analysis process.
[0006] According to a first aspect of an embodiment of the present application, a performance analysis method is provided, the method comprising:
[0007] Acquire target data that meets the requirements of a preset data protocol, wherein the target data includes a target data segment, and the target data segment is used to record log information generated when the target object executes a preset event during the running phase;
[0008] Parsing the target data to obtain the running status information of the target object in the running stage;
[0009] According to the running state information of the target object in the running stage, a preset indicator value of the target object in the running stage is calculated, so as to perform performance analysis on the target object based on the calculated preset indicator value.
[0010] According to a second aspect of an embodiment of the present application, a performance analysis device is provided, the device comprising:
[0011] A data acquisition module is used to acquire target data that meets the requirements of a preset data protocol, wherein the target data includes a target data segment, and the target data segment is used to record log information generated when the target object executes a preset event during the running phase;
[0012] A parsing module, used to parse the target data to obtain the running status information of the target object in the running stage;
[0013] The performance analysis module is used to calculate the preset index value of the target object in the running stage according to the running status information of the target object in the running stage, so as to perform performance analysis on the target object based on the calculated preset index value.
[0014] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the performance analysis method as described above is implemented.
[0015] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, wherein the computer storage medium stores a computer program code, and when the computer program code is executed by a processor, the processor executes the performance analysis method as described above.
[0016] The performance analysis solution provided in the embodiment of the present application sets a unified data protocol for the general performance analysis process in advance, so that based on the unified data protocol, the input target data of the performance analysis is unified in data format (unified into target data that meets the requirements of the preset data protocol). Furthermore, based on the target data in a unified format, when performing subsequent indicator value calculations and performance analysis, the calculation process and the performance analysis process can have higher versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0018] Figure 1 is a flow chart of a performance analysis method according to an embodiment of the present application;
[0019] Figure 2 Schematic diagram of the object event tree corresponding to the target data;
[0020] Figure 3 is a block diagram of a performance analysis device according to an embodiment of the present application;
[0021] Figure 4 For implementation Figure 1 A block diagram of an electronic device showing the performance analysis method. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0023] See also Figure 1 , Figure 1 Flow chart of a performance analysis method according to an embodiment of the present application. The performance analysis method includes:
[0024] Step 102, obtaining target data that meets the requirements of the preset data protocol, wherein the target data includes target data segments, and the target data segments are used to record log information generated when the target object executes preset events during the running stage.
[0025] Specifically, the object in the embodiment of the present application refers to the execution entity of a certain computing process in the computing system, for example, it can refer to hardware such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), DPU (Data Processing Unit), PCIe (PCI-Express, bus and interface standard), or software such as a certain function. The target object in the embodiment of the present application can be an object to be analyzed for performance in the computing system.
[0026] The events in the embodiments of the present application correspond to the start, end, and waiting events of the computing process. The events have information such as the data volume and the start time point.
[0027] The target data in the embodiment of the present application may be composed of one or more target data segments, wherein one target data segment may be used to record log information generated when the target object executes a certain event, that is, one target data segment may represent a certain preset event of the target object.
[0028] The target data in the embodiment of the present application is data that meets the requirements of the preset data protocol. Specifically, the requirements of the preset data protocol may include: the target data is composed of one or more target data segments, wherein each target data segment represents the log information of the target object during the execution of a preset event.
[0029] In the embodiment of the present application, the presentation form of the target data is not limited, for example, it can be in the form of text, binary data, database, network data packet, etc.
[0030] Step 104, parse the target data to obtain the running status information of the target object in the running stage.
[0031] Specifically, the running status information may be information characterizing the running status of the target object. In the embodiment of the present application, the specific content of the running status information is not limited, and it can be customized according to actual analysis requirements. For example, the running status information may include: the execution time information of each preset event executed by the target object, the customized status information of the target object, and so on.
[0032] Step 106 , calculating a preset indicator value of the target object in the running stage according to the running state information of the target object in the running stage, so as to perform performance analysis on the target object based on the calculated preset indicator value.
[0033] Specifically, the embodiments of the present application do not limit the specific content of the preset indicator value, and the setting can be customized according to actual analysis needs. For example, it can be: running time information, etc.
[0034] The performance analysis solution provided in the embodiment of the present application sets a unified data protocol for the general performance analysis process in advance, so that based on the unified data protocol, the input target data of the performance analysis is unified in data format (unified into target data that meets the requirements of the preset data protocol). Furthermore, based on the target data in a unified format, when performing subsequent indicator value calculations and performance analysis, the calculation process and the performance analysis process can have higher versatility.
[0035] Optionally, in some of the embodiments, the target data segment may include: a target object identifier sub-segment, a preset event identifier sub-segment, a preset event occurrence time sub-segment, and a preset event custom attribute sub-segment.
[0036] The above-mentioned running status information may include: execution time information of each preset event executed by the target object, and custom status information of the target object.
[0037] Specifically, the preset data protocol in the above step 102 can also make further standardized provisions for the content contained in the target data segment: the target data segment can include: a target object identifier sub-segment, a preset event identifier sub-segment, a preset event occurrence time sub-segment, and a preset event custom attribute sub-segment.
[0038] The target object identifier sub-segment may be a target object identifier field, and the target object may be uniquely identified based on the field.
[0039] The preset event identification sub-segment, that is, the preset event identification field, or the preset event type sub-segment. This field can represent the type of the preset event, such as: start, end, wait, etc. In the embodiment of the present application, the specific content of the preset event identification sub-segment is not limited, for example: it can be defined as "start", "end", "wait", etc., or it can be defined as a digital sequence (such as: 1, 2, 3...).
[0040] The preset event occurrence time sub-segment is used to represent the time information of the preset event occurrence.
[0041] The custom attribute sub-segment of the preset event is used to characterize one or more dynamic data attributes related to the preset event, such as: input data volume, output data volume, CPU status, memory status, hard disk write and write status, board temperature, hardware error, system error, network protocol, network delay, network bandwidth, PCIe status, DPU operator status, GPU status, etc.
[0042] Optionally, in some embodiments, the above step 104 may include:
[0043] Based on the target data segment included in the target data, an initial data table is generated; a column in the initial data table corresponds to a sub-segment in the target data segment;
[0044] The initial data table is converted into an object event data table; the object event data table includes: a target object identifier column and a state information column, wherein one state information column corresponds to one type of operation state information.
[0045] Specifically, the target data may be tabulated to generate an initial data table. Since the target data segment includes multiple sub-segments (fields), the tabulation method may be: generating a data table including multiple columns (or multiple rows), and then filling the field information in the target data segment into the data table, so that one column (or one row) in the data table corresponds to one sub-segment, thereby forming an initial data table.
[0046] Since the object event data table contains the running status information corresponding to each target object, and the running status information includes: the execution time information of each preset event executed by the target object, and the custom status information of the target object. Therefore, a row (or a column) in the object event data table corresponds to a preset event executed by a target object, that is, a row (or a column) in the object event data table is used to characterize the running status information of a target object in the process of executing each preset event. Through the above object event data table, the running status information of the target object when executing each preset event in the running stage can be intuitively obtained.
[0047] Optionally, in some of the embodiments, the target data segment may also include: an identification sub-segment of the target object's parent node object; the target object identifier sub-segment may include: a target object type sub-segment and a target object identification sub-segment; the target object type sub-segment includes: type information of the target object, and type information of the target object's parent node object.
[0048] Specifically, the preset data protocol in the above step 102 can further standardize the sub-segments (fields) contained in the target data segment: the target data segment can also include: an identification sub-segment of the parent node object of the target object; the target object identifier sub-segment can include: a target object type sub-segment and a target object identification sub-segment; the target object type sub-segment includes: type information of the target object, and type information of the parent node object of the target object.
[0049] The parent node object of the target object may be an object that has the right to call the target object. For example, if function B is called during the execution of function A, then for the target object function B, function A is the parent node object of the target object.
[0050] The target object identifier sub-segment may include: a target object type sub-segment and a target object identification sub-segment. For example, for a function A, it may be called N times during operation, then the function name A of the function A can be used as the type of the target object, and the number of calls of the function can be used as the identification of the target object. For example, when the function A called for the i-th time is used as the target object, the target object type sub-segment is A, the target object identification sub-segment is i, and the target object identifier sub-segment is A:i.
[0051] In addition, the target object type sub-segment may include: type information of the target object, and type information of the parent node object of the target object. For example, for a target object of type B, assuming that its parent node object is of type A, the target object type sub-segment of the target object may be set to: AB. In this way, after obtaining the target object type sub-segment of the target object, the type information of its parent node object may be obtained conveniently by splitting.
[0052] In the embodiments of the present application, there is no limitation on the specific form of the target object type sub-segment, and it can be customized according to the actual situation. For example, in the above method, the target object type sub-segment can be composed of multiple keywords, and the keywords are separated by specific delimiters, and each keyword represents the type of an object. For example: "ABC", "A_B_C", "AAAA", "1-1-1-1-1-1"... If the type of the target object is empty, it indicates that the target object is a root node. By removing the last keyword of the object type, the type of the parent node object of the object is obtained, such as the type of the parent node object of "1-1-1" is "1-1".
[0053] In the above embodiment of the present application, the preset data protocol further limits the sub-segments contained in the target data segment: an identification sub-segment of the parent node object of the target object is added. And the target object identifier sub-segment is split into: a target object type sub-segment and a target object identification sub-segment. In addition, the target object type sub-segment includes: type information of the target object, and type information of the parent node object of the target object. Ultimately, the target data segment contains six sub-segments (six fields): a target object type sub-segment, a target object identification sub-segment, an identification sub-segment of the parent node object of the target object, the preset event identification sub-segment, the preset event occurrence time sub-segment, and the custom attribute sub-segment of the preset event.
[0054] For example, the target data can be expressed as:
[0055] A,1,0,start,2023-08-31 17:52:33.916000000,size_in:1000;cpu:X
[0056] AB,1,1,start,2023-08-31 17:52:33.917500000
[0057] AB,1,1,end,2023-08-31 17:52:33.918500000,size_out:1000;dpu:Y
[0058] A,1,0,end,2023-08-31 17:52:33.919000000
[0059] In the above target data, each line is a target data segment, each target data segment consists of six sub-segments, and two sub-segments are separated by ",". Analysis of the above data shows that:
[0060] 1. The two object types are A and AB, where A runs on the CPU and AB runs on the DPU.
[0061] 2. The two objects are A:1 (1 is the object identifier) and AB:1.
[0062] 3. Object A:1 has two events, start and end, and the time information of the event occurrence. The start and end time difference is the running time of A:1, 3000000ns, and there is data size information of 1000byte. The data processing bandwidth running on the CPU is 1000B / 3000000ns=0.333MB / s.
[0063] 4. Object AB:1 has two events, start and end, and the time information of the events. The difference between the start and end time is the running time of AB:1, 1000000ns. The data size information is obtained from the parent node. The data processing bandwidth running on the DPU is 1000B / 1000000ns=1MB / s.
[0064] 5. The running time of AB:1, 1000000ns, accounts for 33.3% of the running time of the parent node A:1, 3000000ns.
[0065] When the target data segment includes the above six sub-segments, correspondingly, before converting the initial data table into the object event data table, the following may also be included:
[0066] Based on the target object type sub-fragment, determine the type information of the parent node object of the target object;
[0067] And add a parent node object type column to the initial data table to form a transition data table;
[0068] Convert the initial data table to an object event data table, including:
[0069] An object event tree data table is generated based on the data in the transition data table; the object event tree data table includes: a target object identifier column, a parent node object identifier column, and a state information column.
[0070] Based on the above target data segment containing six sub-segments, an object event tree data table can be generated in the end. The commonality between the object event tree data table and the above object event data table is that a row (or a column) in the object event tree data table can still be used to characterize the running state information of a target object during the execution of each preset event. That is, through the above object event data table, the running state information of the target object when executing each preset event in the running stage can still be intuitively obtained.
[0071] In addition, since the target data fragment contains the target object type sub-segment, the identification sub-segment of the parent node object of the target object, and the parent-child node relationship between the target object and other objects, compared with the above-mentioned object event data table, the object event tree data table is characterized in that the table can also show the structure tree relationship between each object: the call relationship between two objects (father-child nodes), or the serial-parallel relationship between two objects (brother nodes). In other words, the object event tree data table is equivalent to an object event tree, and the information transmitted by the two is equivalent.
[0072] The Object-Event Tree (OET) is a data model used to describe the relationship between objects and events, and between events. This concept is a new concept defined to solve the performance analysis problem of complex hardware and software systems.
[0073] The OET concept consists of three basic concepts: object, event, and tree. Among them, the object concept corresponds to the execution entity of a certain computing process. It can refer to hardware objects such as CPU, GPU, DPU, PCIe, or a function object. The event concept corresponds to events such as the start and end of a computing process. Events have information such as data size and time point. The tree concept is to describe the relationship between events. Generally speaking, the parent and child nodes of the tree correspond to the scheduling relationship of object events, and the brother nodes of the tree correspond to the serial and parallel relationship of object events.
[0074] See also Figure 2 , Figure 2 The diagram is a schematic diagram of the object event tree corresponding to the target data. From the diagram, we can see not only the running status information of each target object when executing each preset event in the running stage, but also the structure tree relationship between each target object: object A:1 is a brother node of object A:2 and object A:3; object A:1 is the parent node of object AB:1, object A:1 is also the parent node of object AC:1, object A:1 is also the parent node of object AC:2; object AB:1 is a brother node of object AC:1 and object AC:2.
[0075] Since the object event tree data table generated based on the above-mentioned target data segment containing six sub-segments is equivalent to an object event tree, and the above-mentioned target data segment complies with the preset data protocol, the preset data protocol in this case can be called the object event tree (OET) protocol.
[0076] For ease of understanding, the following is an example to explain the process of generating an object event tree data table based on target data:
[0077] Let's take the target data X1 as an example:
[0078] A,1,0,start,2023-08-31 17:52:33.916000000,size_in:1000;cpu:X
[0079] AB,1,1,start,2023-08-31 17:52:33.917500000
[0080] AB,1,1,end,2023-08-31 17:52:33.918500000,size_out:1000;dpu:Y
[0081] A,1,0,end,2023-08-31 17:52:33.919000000
[0082] The above-mentioned target data X1 contains 4 target data fragments, each of which contains six sub-fragments, namely: the target object type sub-segment, the target object identifier sub-segment, the identifier sub-segment of the parent node object of the target object, the preset event identifier sub-segment, the preset event occurrence time sub-segment and the custom attribute sub-segment of the preset event.
[0083] First, based on the above target data X1, generate the initial data table X2:
[0084] obj_type obj_id father_id event time att_list A 1 0 start 2023-08-31 17:52:33.916000000 size_in:1000; cpu:X AB 1 1 start 2023-08-31 17:52:33.917500000 (null) AB 1 1 end 2023-08-31 17:52:33.918500000 size_out:1000;dpu:Y A 1 0 end 2023-08-31 17:52:33.919000000 (null)
[0085] Among them, obj_type corresponds to the target object type sub-segment, obj_id corresponds to the target object identifier sub-segment, father_id corresponds to the identifier sub-segment of the target object's parent node object, event corresponds to the preset event identifier sub-segment, time corresponds to the preset event occurrence time sub-segment, and att_list corresponds to the custom attribute sub-segment of the preset event.
[0086] After generating the initial data table X2, the type information of the parent node object of the target object can be determined based on the target object type sub-segment obj_type in the table. Then, the father-type column of the parent node object type is added to the initial data table X2, and the attribute values (input data size-in, output data size-out, CPU, DPU information) in the custom attribute sub-segment of the preset event are extracted to form the transition data table X3:
[0087] obj_type obj_id father_id event time father_type size_in size_out cpu dpu A 1 0 start 916000 (null) 1000 (null) X (null) AB 1 1 start 917500 A (null) (null) (null) (null) AB 1 1 end 918500 A (null) 1000 (null) Y A 1 0 end 919000 (null) (null) (null) (null) (null)
[0088] Afterwards, based on the data in the transition data table X3, an object event tree data table is generated. The specific process may be:
[0089] First, convert the transition data table X3 into the following data table X4:
[0090] obj_type obj_id father_type father_id start end size_in size_out cpu dpu A 1 (null) 0 916000 919000 1000 (null) X (null) AB 1 A 1 917500 918500 (null) 1000 (null) Y
[0091] Then, obj_type and obj_id in the above data table X4 are combined to form the (target) object identifier obj_guid, and father_type and father_id in the above data table X4 are combined to form the parent node object identifier father_guid, and finally the object event tree data table X5 is obtained:
[0092] obj_guid father_guid start end size_in size_out cpu dpu A:1 0 916000 919000 1000 (null) X (null) AB:1 A:1 917500 918500 (null) 1000 (null) Y
[0093] Among them, X5 contains the object identifier obj_guid column, the parent node object identifier obj_guid column, and also includes multiple status information columns, such as: the start event of each event, the input data volume, the output data volume, etc. From the second row in X5, the running status information of the target object A:1 can be obtained. For example, if the parent node of A:1 is 0, it means that A:1 is the root node, the start running time of A:1 is 916000ns, the end time is 919000ns, the input data volume is 1000 bytes, and A:1 runs on the CPU. From the third row in X5, the running status information of the target object AB:1 can be obtained. For example, if the parent node of AB:1 is A:1, the start running time of AB:1 is 917500, the end time is 918500, the output data volume is 1000 bytes, and AB:1 runs on the DPU.
[0094] Optionally, in some embodiments, the custom state information of the target object includes: input data volume information. The above step 106 may include:
[0095] In the object event tree data table, if the input data volume of the target object is empty, the input data volume of the parent node object of the target object is used as the input data volume of the target object.
[0096] Optionally, in some embodiments, the custom state information of the target object includes: output data volume information. The above step 106 may include:
[0097] In the object event tree data table, if the output data volume of the target object is empty, the sum of the output data volumes of all child node objects of the target object is taken as the output data volume of the target object.
[0098] Specifically, the input data volume information represents the volume of input data, and the output data volume information represents the volume of output data.
[0099] Taking the above object event tree data table X5 as an example, when the input data volume information of the target object is empty, the input data volume value of the parent node object of the target object can be assigned to the input data volume of the target object. Therefore, data table X6 can be obtained:
[0100] obj_guid father_guid start end size_in size_out cpu dpu A:1 0 916000 919000 1000 (null) X (null) AB:1 A:1 917500 918500 1000 1000 (null) Y
[0101] When the output data volume information of the target object is empty, the sum of the output data volumes of all child node objects of the target object can be used as the output data volume of the target object. Therefore, data table X7 can also be obtained:
[0102] obj_guid father_guid start end size_in size_out cpu dpu A:1 0 916000 919000 1000 1000 X (null) AB:1 A:1 917500 918500 1000 1000 (null) Y
[0103] In addition, the preset attribute values in the data table (such as the hardware where the target object is located) can be copied from the parent node object to all child node objects. Therefore, the data table X8 can also be obtained:
[0104] obj_guid father_guid start end size_in size_out cpu dpu A:1 0 916000 919000 1000 1000 X Y AB:1 A:1 917500 918500 1000 1000 X Y
[0105] After obtaining the object event tree data table and filling the corresponding data based on the object event tree data table, the preset index value of the target object in the running stage can be calculated based on the data table after the data filling. After obtaining the preset index value, the performance analysis of the target object can be performed based on the obtained preset index value.
[0106] In the embodiment of the present application, the specific content of the preset indicator value is not limited and can be customized according to the needs of actual performance analysis.
[0107] For example, based on the above-obtained data table X8, a new indicator value may be added: run-time, where run-time = end-start, and then the data table X9 may be obtained:
[0108] obj_guid father_guid start end size_in size_out cpu dpu run_time A:1 0 916000 919000 1000 1000 X Y 3000 AB:1 A:1 917500 918500 1000 1000 X Y 1000
[0109] You can also add new indicator values: input bandwidth speed_in and output bandwidth speed_out, and you can get data table X10:
[0110] obj father start end size_in size_out run_time speed_in speed_out A:1 0 916000 919000 1000 1000 3000 0.33333 0.33333 AB:1 A:1 917500 918500 1000 1000 1000 1 1
[0111] In addition, the running time of various types of target objects can be generated according to the above data table X10, thereby obtaining a data table X11:
[0112] obj_type run_time A 3000 AB 1000
[0113] And, calculate the proportion of each child node object's run-time in the parent node object's run-time to obtain data table X12:
[0114] obj_type run_time rate A 3000 100% AB 1000 33.33%
[0115] See also Figure 3 , Figure 3 FIG. 1 is a block diagram of a performance analysis device according to an embodiment of the present application. Figure 3 , the performance analysis device comprises:
[0116] A data acquisition module 302 is used to acquire target data that meets the requirements of a preset data protocol. The target data includes a target data segment, and the target data segment is used to record log information generated when the target object executes a preset event during the running stage;
[0117] The parsing module 304 is used to parse the target data and obtain the running status information of the target object in the running stage;
[0118] The performance analysis module 306 is used to calculate a preset indicator value of the target object in the running stage according to the running state information of the target object in the running stage, so as to perform performance analysis on the target object based on the calculated preset indicator value.
[0119] Optionally, in some of the embodiments, the target data segment includes: a target object identifier sub-segment, a preset event identifier sub-segment, a preset event occurrence time sub-segment, and a preset event custom attribute sub-segment;
[0120] The running status information includes: the execution time information of each preset event executed by the target object and the custom status information of the target object.
[0121] Optionally, in some embodiments, the parsing module 304 is specifically configured to:
[0122] Based on the target data segment included in the target data, an initial data table is generated; a column in the initial data table corresponds to a sub-segment in the target data segment;
[0123] Convert the initial data table into an object event data table; the object event data table contains:
[0124] A target object identifier column and a status information column, wherein one status information column corresponds to one type of running status information.
[0125] Optionally, in some embodiments, the target data segment further includes: an identification sub-segment of the parent node object of the target object; the target object identifier sub-segment includes: a target object type sub-segment and a target object identification sub-segment; the target object type sub-segment includes:
[0126] Type information of the target object and type information of the parent node object of the target object;
[0127] The parsing module 304, before executing the step of converting the initial data table into the object event data table, is further used to:
[0128] Based on the target object type sub-fragment, determine the type information of the parent node object of the target object;
[0129] And add a parent node object type column to the initial data table to form a transition data table;
[0130] The parsing module 304, when executing the step of converting the initial data table into the object event data table, is specifically used for:
[0131] An object event tree data table is generated based on the data in the transition data table; the object event tree data table includes: a target object identifier column, a parent node object identifier column, and a state information column.
[0132] Optionally, in some of these embodiments, the custom state information of the target object includes: input data volume information;
[0133] The performance analysis module 306 is specifically configured to use the input data volume of the parent node object of the target object as the input data volume of the target object if the input data volume of the target object is empty in the object event tree data table.
[0134] Optionally, in some of these embodiments, the custom state information of the target object includes: output data volume information;
[0135] The performance analysis module 306 is specifically configured to, if the output data volume of the target object is empty in the object event tree data table, take the sum of the output data volumes of all child node objects of the target object as the output data volume of the target object.
[0136] Optionally, in some of the embodiments, the data format of the target data may be any one of the following: text data format, binary data format, database format, network data packet format.
[0137] The performance analysis device of this embodiment is used to implement the corresponding performance analysis methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the performance analysis device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0138] See also Figure 4 , Figure 4 For implementation Figure 1 A block diagram of an electronic device showing the performance analysis method.
[0139] Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0140] Figure 4 The electronic device shown may include, but is not limited to, at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410). The storage unit 420 stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 performs the steps according to various exemplary embodiments of the present invention described in the description section of the exemplary method above in this specification.
[0141] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and / or a cache storage unit 4202 , and may further include a read-only storage unit (ROM) 4203 .
[0142] The storage unit 420 may also include a program / utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0143] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0144] The electronic device can also communicate with one or more external devices 500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with any device (e.g., routers, modems, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication can be performed through an input / output (I / O) interface 450. In addition, the electronic device can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs) and / or public networks, such as the Internet) through a network adapter 460. As shown in the figure, the network adapter 460 communicates with other modules of the electronic device through a bus 430. It should be understood that, although not shown in the figure, the electronic device can be implemented using other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0145] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device such as a server to execute the method according to the implementation of the present disclosure.
[0146] In an exemplary embodiment of the present disclosure, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method described in the above method embodiment.
[0147] According to one embodiment of the present disclosure, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0148] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0149] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0150] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0151] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0152] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0153] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0154] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0155] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A performance analysis method, characterized in that: The method comprises: Acquire target data that meets the requirements of a preset data protocol, wherein the target data includes a target data segment, and the target data segment is used to record log information generated when the target object executes a preset event during the running phase; the target data segment includes: an identification sub-segment of a parent node object of the target object; a target object type sub-segment and a target object identification sub-segment; the target object type sub-segment includes: type information of the target object, and type information of the parent node object of the target object; Based on the target data segment, generating an initial data table; Based on the type information of the parent node object of the target object, adding a parent node object type column in the initial data table to form a transition data table; The target object type sub-segment and the target object identification sub-segment in the transition data table are merged to generate a target object identifier column, and the identification sub-segment of the parent node object of the target object and the parent node object type column are merged to generate a parent node object identifier column, thereby obtaining an object event tree data table; the object event tree data table includes a state information column, wherein one state information column corresponds to one type of operation state information; According to the running state information of the target object in the running stage, a preset indicator value of the target object in the running stage is calculated, so as to perform performance analysis on the target object based on the calculated preset indicator value.
2. The method according to claim 1, characterized in that The target data segment includes: the preset event identification sub-segment, the preset event occurrence time sub-segment, and the preset event custom attribute sub-segment; The running status information includes: execution time information of each preset event executed by the target object and custom status information of the target object.
3. The method according to claim 2, characterized in that A column in the initial data table corresponds to a sub-segment in the target data segment.
4. The method according to claim 2, characterized in that: The custom state information of the target object includes: input data volume information; The calculating, according to the running state information of the target object in the running stage, a preset indicator value of the target object in the running stage comprises: In the object event tree data table, if the input data volume of the target object is empty, the input data volume of the parent node object of the target object is used as the input data volume of the target object.
5. The method according to claim 2, characterized in that: The custom state information of the target object includes: output data volume information; The calculating, according to the running state information of the target object in the running stage, a preset indicator value of the target object in the running stage comprises: In the object event tree data table, if the output data volume of the target object is empty, the sum of the output data volumes of all child node objects of the target object is used as the output data volume of the target object.
6. The method according to claim 1, characterized in that The data format of the target data is any of the following: text data format, binary data format, database format, network data packet format.
7. A performance analysis device, characterized in that: The device comprises: A data acquisition module is used to acquire target data that meets the requirements of a preset data protocol, wherein the target data includes a target data segment, and the target data segment is used to record log information generated when the target object executes a preset event during the running phase; the target data segment includes: an identification sub-segment of the parent node object of the target object; a target object type sub-segment and a target object identification sub-segment; the target object type sub-segment includes: type information of the target object, and type information of the parent node object of the target object; A parsing module, used for generating an initial data table based on the target data segment; Based on the type information of the parent node object of the target object, adding a parent node object type column in the initial data table to form a transition data table; The target object type sub-segment and the target object identification sub-segment in the transition data table are merged to generate a target object identifier column, and the identification sub-segment of the parent node object of the target object and the parent node object type column are merged to generate a parent node object identifier column, thereby obtaining an object event tree data table; the object event tree data table includes a state information column, wherein one state information column corresponds to one type of operation state information; The performance analysis module is used to calculate the preset index value of the target object in the running stage according to the running status information of the target object in the running stage, so as to perform performance analysis on the target object based on the calculated preset index value.
8. An electronic device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer storage medium, characterized in that The computer storage medium stores computer program codes, and when the computer program codes are executed by a processor, the processor is enabled to execute the method according to any one of claims 1 to 6.
