A performance testing method, device, terminal and storage medium for a blockchain platform
By monitoring server status in the blockchain platform, obtaining and comparing initial and change information, the problem of inaccurate detection results in the existing technology is solved, the credibility of the detection results is improved, and the performance detection of the blockchain platform is ensured. accuracy.
Patent Information
- Application Number
- CN202011526714.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-22
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-12-22
AI Technical Summary
Existing blockchain platform performance detection methods cannot guarantee the accuracy of detection results, and the reliability of detection methods is low, mainly due to the possibility of data tampering during the processing of data nodes.
By performing test operations on the blockchain platform, the initial status information and status change information of the server are obtained, and compared to obtain performance analysis results, thereby monitoring the actual task processing capabilities of the blockchain platform and ensuring the correctness of the detection results. and credibility.
It realizes the acquisition and analysis of substantive data processing performance of distributed data nodes in the blockchain platform, and improves the accuracy and credibility of detection results.
Smart Images

Figure CN112506798B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of blockchain technology, and in particular, relates to a performance testing method, device, terminal and storage medium for a blockchain platform. Background Art
[0002] The capabilities of current blockchain platforms vary greatly, and various publicity and descriptions may be exaggerated. Existing testing of blockchain platform capabilities is mainly result-oriented, specifically judging the performance of the platform based on the final display results of the blockchain platform's task execution.
[0003] However, due to the existence of numerous data nodes in the blockchain platform, there is a high possibility that the data will be tampered with during the data processing process. Therefore, the existing blockchain platform capability detection method cannot guarantee the correctness of the detection results, and the detection means have low credibility. Summary of the invention
[0004] The embodiments of the present application provide a performance testing method, device, terminal and storage medium for a blockchain platform to solve the problem that the detection method of the blockchain platform capability in the prior art cannot guarantee the correctness of the detection result and the detection means has low credibility.
[0005] A first aspect of an embodiment of the present application provides a performance testing method for a blockchain platform, including:
[0006] Obtaining a test operation, and executing the test operation in the blockchain platform;
[0007] Obtaining initial status information of a server in the blockchain platform and status change information of the server during execution of the test operation;
[0008] Comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation;
[0009] The performance analysis results are displayed.
[0010] A second aspect of an embodiment of the present application provides a performance testing device for a blockchain platform, including:
[0011] A first acquisition module is used to acquire a test operation and execute the test operation in the blockchain platform;
[0012] A second acquisition module is used to obtain the initial state information of the server in the blockchain platform and the state change information of the server during the execution of the test operation;
[0013] A third acquisition module is used to compare the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation;
[0014] A display module is used to display the performance analysis result.
[0015] A third aspect of an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0016] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] A fifth aspect of the present application provides a computer program product, which, when executed on a terminal, enables the terminal to execute the steps of the method described in the first aspect.
[0018] As can be seen from the above, in the embodiments of the present application, the acquired test operation is executed in the blockchain platform, and the initial state information of the server in the blockchain platform and the state change information of the server during the execution of the test operation are obtained, the state change information is compared with the initial state information, and the performance analysis result corresponding to the test operation is obtained and displayed. By monitoring the state of the server in the blockchain platform, the actual task processing capability of the blockchain platform during the execution of the test task is tested, so that the substantial data processing performance of each distributed data node in the blockchain platform can be acquired and analyzed, thereby ensuring the correctness of the detection result and improving the credibility of the detection means. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 This is a process of a performance testing method for a blockchain platform provided in an embodiment of the present application. Figure 1 ;
[0021] Figure 2 This is a process of a performance testing method for a blockchain platform provided in an embodiment of the present application. Figure 2 ;
[0022] Figure 3 It is a structural diagram of a performance testing device for a blockchain platform provided in an embodiment of the present application;
[0023] Figure 4 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0025] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0026] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0027] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0028] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0029] In a specific implementation, the terminal described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).
[0030] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.
[0031] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.
[0032] Various applications that can be executed on the terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within corresponding applications. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.
[0033] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0034] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0035] See also Figure 1 , Figure 1 This is a process of a performance testing method for a blockchain platform provided in an embodiment of the present application. Figure 1 .like Figure 1 As shown, a performance testing method for a blockchain platform includes the following steps:
[0036] Step 101, obtain a test operation, and execute the test operation in the blockchain platform.
[0037] The test operation may be, for example, an operation that can have an impact on the server in the blockchain platform, such as the transmission of data between nodes, the addition or deletion of nodes, the modification or deletion of data in nodes, and the like.
[0038] In this step, the tester needs to first obtain the operation authority of the blockchain platform and perform targeted test operations on the blockchain platform.
[0039] The test operation may be obtained by reading the test operation configured in a preset test configuration file to realize the automated execution of the test process, or the test operation may be obtained by receiving the configuration input of the tester.
[0040] Step 102, obtaining the initial status information of the server in the blockchain platform and the status change information of the server during the execution of the test operation.
[0041] The initial state information and state change information may be information related to the server's usage rate, memory usage, data transfer, input / output, etc. The initial state information is specifically acquired by monitoring the server before the test operation is executed, or acquired by monitoring the server during the initial execution phase of the test operation.
[0042] After the test operation is executed, the corresponding server status changes are caused, and the status changes can be captured by the server's own hardware detection tool or an additional status detection tool, such as a network packet capture tool.
[0043] The capabilities of the blockchain platform can be tested by monitoring the impact of various test operations on the server when performed on the blockchain platform.
[0044] Among them, the state change information of the server is generated during the execution of the test operation. For example, during the consensus process of the blockchain nodes, data needs to be transmitted, which causes network fluctuations. The various status indicators of the server change accordingly. By obtaining the state change information of the server, the consensus capability of the blockchain platform can be judged.
[0045] By directly detecting changes in the status of the server where the blockchain platform is located, changes in data, etc., the problem can be fundamentally solved to achieve the capacity detection of the blockchain platform.
[0046] Step 103, comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation.
[0047] In this process, the initial state information is formed as the reference data of the state change information, and the state change information is compared with the initial state information. Through the comparison, it is determined whether the two are the same. If they are not the same, the degree of difference can be obtained, and then the task processing capability and processing effect when executing the test task on the blockchain platform can be obtained, and the corresponding performance analysis results can be obtained.
[0048] In this process, the analysis results are used to determine whether the blockchain has the corresponding capabilities for the test operation. The capabilities of the blockchain platform are judged or assisted by directly verifying the changes in the server status, and the capabilities of the blockchain platform are verified at the operating system level, which is highly reliable and improves the credibility of performance testing.
[0049] Step 104: Display the performance analysis results.
[0050] After the status information analysis is completed, the performance analysis results can be displayed through the display module so that testers can optimize the blockchain platform based on the performance analysis results.
[0051] In an embodiment of the present application, the acquired test operation is executed in the blockchain platform, and the initial state information of the server in the blockchain platform and the state change information of the server during the execution of the test operation are obtained, the state change information is compared with the initial state information, and the performance analysis result corresponding to the test operation is obtained and displayed. By monitoring the state of the server in the blockchain platform, the actual task processing capability of the blockchain platform during the execution of the test task is tested, so that the substantial data processing performance of each distributed data node in the blockchain platform can be acquired and analyzed, thereby ensuring the correctness of the detection result and improving the credibility of the detection means.
[0052] The embodiments of this application also provide different implementation methods of the performance testing method of the blockchain platform.
[0053] See also Figure 2 , Figure 2 This is a process of a performance testing method for a blockchain platform provided in an embodiment of the present application. Figure 2 .like Figure 2 As shown, a performance testing method for a blockchain platform includes the following steps:
[0054] Step 201, obtain a test operation, obtain information to be transmitted according to the test operation, and send the information to be transmitted to a target node in the blockchain platform.
[0055] The information to be transmitted is used to be transmitted between nodes in the blockchain platform, so as to detect the performance of each node in the blockchain platform through the transmission process of the information to be transmitted.
[0056] Step 202, obtaining the initial status information of the server in the blockchain platform and the status change information of the server during the execution of the test operation.
[0057] During the execution of step 201 and step 202, as an optional implementation, step 201 may include:
[0058] Extracting transfer transaction information from the test operation; and sending the transfer transaction information to a first node in the blockchain platform.
[0059] The first node is the target node. The transfer transaction information is the information to be transmitted.
[0060] Correspondingly, step 202 includes:
[0061] The transfer transaction information is used as the initial state information of the server where the first node is located; when the first node transmits the transfer transaction information to other nodes in the blockchain platform for consensus, a packet capture operation is performed on the transfer transaction information transmitted by the server where the first node is located during the consensus transmission process to obtain state change information.
[0062] When the test operation requires the first node to reach consensus on the transfer transaction information among the nodes in the blockchain platform, the transfer transaction information identified from the test operation is sent to the first node, so that the first node transmits it to other nodes in the blockchain platform to achieve consensus among the nodes.
[0063] Among them, consensus transmission refers to the information transmission between nodes in the blockchain platform to reach node consensus among nodes.
[0064] In this process, the identified transfer transaction information becomes the initial information that exists locally before the server where the first node is located transmits it to other nodes for consensus transmission, so it is used as the initial state information of the server where the first node is located. Since the server where the first node is located needs to undertake the task of data consensus transmission, the transfer transaction information may undergo changes in data form such as encapsulation structure or encryption during the data transmission process. Here, the transfer transaction information transmitted by the server where the first node is located during the consensus transmission process is captured to obtain the state change information corresponding to the transfer transaction information.
[0065] This enables the initial state information of the server where the first node is located before data consensus transmission and the state change information during data consensus transmission to be obtained separately.
[0066] Specifically, an example is given to illustrate the process.
[0067] For example, encrypted transmission is required when blockchain nodes on a blockchain platform conduct message consensus transmission. A chain has four nodes, namely node one, node two, node three, and node four.
[0068] The tester sends a transfer transaction message to Node 1. The transfer transaction message is in plain text. After receiving the transaction message, Node 1 will pass the consensus of the transaction to the other three nodes.
[0069] The tester captures the transfer transaction information during the consensus transmission process from node one on the server to other nodes. Specifically, the tester can capture the transfer transaction information from the information output channel of the server where node one is located, or from the information input channel of the server where node two, node three, and node four are located, to capture the consensus information of the transaction and obtain the status change information.
[0070] By comparing the initial state information with the state change information, when it is determined that the data formats of the state change information and the state change information are inconsistent, it can be determined that the encrypted transmission of the information is achieved through processing by the server where the node is located. If the data formats of the two are consistent, it means that the blockchain platform has not implemented encrypted transmission operations in the consensus project.
[0071] On the other hand, during the execution of step 201 and step 202, as an optional implementation, step 201 may include:
[0072] According to the node adding operation, the newly added node in the blockchain platform is determined, and the node data of the second node in the blockchain platform is determined as the information to be transmitted; the node data is sent to the newly added node.
[0073] This test operation is a node addition operation. When performing a node addition operation, the node data of the nodes in the blockchain platform needs to be transmitted to the newly added node for consensus. The newly added node is the target node.
[0074] Correspondingly, step 202 includes:
[0075] Obtain a first CPU usage rate of the server where the newly added node is located before sending the node data to the newly added node. When it is determined that the first CPU usage rate is less than a threshold value, use the first CPU usage rate as initial state information. Obtain a second CPU usage rate of the server where the newly added node is located during the process of sending the node data to the newly added node, and use the second CPU usage rate as state change information.
[0076] The usage rate of the server where the newly added node is located will change before and after obtaining the node data. The usage rate is used to determine whether the node addition in the blockchain platform is successful, and if successful, the data processing and data synchronization efficiency of the newly added node.
[0077] When the first CPU usage rate is used as the initial status information, it is necessary to ensure that the first CPU usage rate is less than a threshold value, such as one percent, so as to detect the usage of the CPU (Center Process Unit) in the server and ensure that there are no services on the server that will generate a large amount of CPU computing. Specifically, the first CPU usage rate is, for example, zero percent at this time.
[0078] Furthermore, the newly added node in this process may also be the first node mentioned in the previous implementation.
[0079] Specifically, an example is given to illustrate the process.
[0080] For example, the blockchain platform has the ability to add new node consensus data during normal use. A chain has four nodes, namely node 1, node 2, node 3, and node 4. At this time, the operation of adding node 5 is performed.
[0081] When judging whether the node addition operation is successful, in addition to directly querying whether the consensus data exists on node five after the data consensus transmission operation is completed. Auxiliary judgment can also be made by detecting the usage of the server where node five is located. Before the operation, the usage of the server of node five is detected. If there is no service on the server that will generate a large amount of computing, the server usage rate is zero at this time. After executing the operation of adding a new node for data consensus transmission, the usage rate of the server where node five is located is detected again, because the consensus data of node five requires a large amount of computing. If the change in server usage during the consensus process is not captured, it can be directly judged that the node addition failed or no consensus was reached. On the contrary, if the change in the usage rate of the server where node five is located is captured during the consensus process, and the consensus data is queried at node five afterwards, the credibility of the detection result can be greatly increased, and the acquisition of the data processing performance of the new node can be realized according to the change in server usage.
[0082] Step 203, compare the state change information with the initial state information to obtain a comparison result.
[0083] Step 204, if the comparison result indicates that the current state of the server is consistent with the initial state, then determine that the performance analysis result corresponding to the test operation is execution failure; if the comparison result indicates that the current state of the server is inconsistent with the initial state, then analyze the state indicator corresponding to the state change information to obtain the performance execution result of the test operation.
[0084] The current state is the server state of the newly added node after the server state changes due to receiving node data, which is obtained based on the state change information. The initial state is the state of the server corresponding to the initial state information. If the state change information is consistent with the initial state information, a comparison result of the current state of the server and the initial state can be obtained, indicating that the server is not affected by the test task, the test task is not executed or an error occurs during the execution process, and the performance analysis result corresponding to the task test operation is execution failure and poor performance.
[0085] When the state change information is inconsistent with the initial state information, a comparison result of the inconsistency between the current state of the server and the initial state can be obtained, indicating that the server has executed the test task. At this time, the state indicator corresponding to the state change information can be analyzed to obtain the performance execution result of the test operation. The state indicator is, for example, execution time, data throughput, memory usage, etc.
[0086] Step 205: Display the performance analysis results.
[0087] Here, the performance analysis result is the performance execution result of the test operation that failed to execute or was analyzed. After the comparison, the comparison result is displayed.
[0088] The implementation process of this step is the same as the implementation process of step 104 in the aforementioned embodiment, and will not be repeated here.
[0089] In an embodiment of the present application, by obtaining information to be transmitted based on a test operation, and sending the information to be transmitted to a target node in the blockchain platform, and obtaining the initial state information of the server in the blockchain platform and the state change information of the server during the execution of the test operation, the state change information is compared with the initial state information. If it is determined that the current state of the server is consistent with the initial state, the performance analysis result corresponding to the test operation is determined to be an execution failure; if it is determined that the current state of the server is inconsistent with the initial state, the state indicator corresponding to the state change information is analyzed to obtain the performance execution result of the test operation, and the comparison result is displayed. By monitoring the state of the server in the blockchain platform, the actual task processing capability of the blockchain platform during the execution of the test task is tested, so that the substantial data processing performance of each distributed data node in the blockchain platform can be obtained and analyzed, the correctness of the detection result is ensured, and the credibility of the detection means is improved.
[0090] See also Figure 3 , Figure 3 This is a structural diagram of a performance testing device for a blockchain platform provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0091] The performance testing device 300 of the blockchain platform includes:
[0092] A first acquisition module 301 is used to acquire a test operation and execute the test operation in the blockchain platform;
[0093] The second acquisition module 302 is used to obtain the initial state information of the server in the blockchain platform and the state change information of the server during the execution of the test operation;
[0094] A third acquisition module 303 is used to compare the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation;
[0095] The display module 304 is used to display the performance analysis result.
[0096] The first acquisition module 301 includes:
[0097] The information transmission submodule is used to obtain the information to be transmitted according to the test operation, and send the information to be transmitted to the target node in the blockchain platform.
[0098] Specifically, the information transmission submodule is specifically used for:
[0099] Extracting transfer transaction information from the test operation;
[0100] The transfer transaction information is sent to the first node in the blockchain platform.
[0101] The second acquisition module 302 is specifically used for:
[0102] Using the transfer transaction information as initial state information of the server where the first node is located;
[0103] When the first node transmits the transfer transaction information to other nodes in the blockchain platform through consensus, a packet capture operation is performed on the transfer transaction information transmitted by the server where the first node is located during the consensus transmission process to obtain the state change information.
[0104] The information transmission submodule is also specifically used for:
[0105] According to the node adding operation, determining a newly added node in the blockchain platform, and determining the node data of the second node in the blockchain platform as information to be transmitted;
[0106] The node data is sent to the newly added node.
[0107] Correspondingly, the second acquisition module 302 is further specifically configured to:
[0108] Obtaining a first CPU usage rate of the server where the newly added node is located before sending the node data to the newly added node;
[0109] When it is determined that the first CPU usage rate is less than a threshold, using the first CPU usage rate as the initial state information;
[0110] A second CPU usage rate of the server where the newly added node is located is obtained during the process of sending the node data to the newly added node, and the second CPU usage rate is used as the state change information.
[0111] The third acquisition module is specifically used for:
[0112] Comparing the state change information with the initial state information to obtain a comparison result;
[0113] If the comparison result indicates that the current state of the server is consistent with the initial state, determining that the performance analysis result corresponding to the test operation is execution failure;
[0114] If the comparison result indicates that the current state of the server is inconsistent with the initial state, the state indicator corresponding to the state change information is analyzed to obtain the performance execution result of the test operation.
[0115] The performance testing device for a blockchain platform provided in the embodiment of the present application can implement each process of the embodiment of the performance testing method for the above-mentioned blockchain platform and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0116] Figure 4 4 is a structural diagram of a terminal provided in an embodiment of the present application. As shown in the figure, the terminal 4 of this embodiment includes: at least one processor 40 ( Figure 4 Only one is shown in the figure), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, wherein the processor 40 implements the steps of any of the above-mentioned method embodiments when executing the computer program 42.
[0117] The terminal 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of terminal 4 and does not constitute a limitation on terminal 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0118] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0119] The memory 41 may be an internal storage unit of the terminal 4, such as a hard disk or memory of the terminal 4. The memory 41 may also be an external storage device of the terminal 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal 4. The memory 41 is used to store the computer program and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.
[0120] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0121] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0123] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0126] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0127] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be implemented through a computer program product. When the computer program product runs on a terminal, the terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0128] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A performance testing method for a blockchain platform. It is characterized in that include: Obtaining a test operation, and executing the test operation in the blockchain platform; Obtaining initial status information of a server in the blockchain platform and status change information of the server during execution of the test operation; Comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation; Display the performance analysis results; The performing of the test operation in the blockchain platform includes: Acquire the information to be transmitted according to the test operation, and send the information to be transmitted to the target node in the blockchain platform; The step of obtaining the information to be transmitted according to the test operation and sending the information to be transmitted to a target node in the blockchain platform includes: Extracting transfer transaction information from the test operation; The transfer transaction information is sent to the first node in the blockchain platform.
2. The method according to claim 1, It is characterized in that The obtaining of the initial status information of the server in the blockchain platform and the status change information of the server during the execution of the test operation includes: Using the transfer transaction information as initial state information of the server where the first node is located; When the first node transmits the transfer transaction information to other nodes in the blockchain platform through consensus, a packet capture operation is performed on the transfer transaction information transmitted by the server where the first node is located during the consensus transmission process to obtain the state change information.
3. The method according to claim 1, It is characterized in that The step of obtaining the information to be transmitted according to the test operation and sending the information to be transmitted to the target node in the blockchain platform further includes: According to the node adding operation, determining a newly added node in the blockchain platform, and determining the node data of the second node in the blockchain platform as information to be transmitted; The node data is sent to the newly added node.
4. The method according to claim 3, It is characterized in that The obtaining of the initial status information of the server in the blockchain platform and the status change information of the server during the execution of the test operation includes: Obtaining a first CPU usage rate of the server where the newly added node is located before sending the node data to the newly added node; When it is determined that the first CPU usage rate is less than a threshold, using the first CPU usage rate as the initial state information; A second CPU usage rate of the server where the newly added node is located is obtained during the process of sending the node data to the newly added node, and the second CPU usage rate is used as the state change information.
5. The method according to any one of claims 1 to 4, It is characterized in that The comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation includes: Comparing the state change information with the initial state information to obtain a comparison result; If the comparison result indicates that the current state of the server is consistent with the initial state, determining that the performance analysis result corresponding to the test operation is execution failure; If the comparison result indicates that the current state of the server is inconsistent with the initial state, the state indicator corresponding to the state change information is analyzed to obtain the performance execution result of the test operation.
6. A performance testing device for a blockchain platform, It is characterized in that include: A first acquisition module is used to acquire a test operation and execute the test operation in the blockchain platform; A second acquisition module is used to obtain the initial state information of the server in the blockchain platform and the state change information of the server during the execution of the test operation; A third acquisition module is used to compare the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation; A display module, used for displaying the performance analysis result; The first acquisition module includes: An information transmission submodule, used for obtaining information to be transmitted according to the test operation, and sending the information to be transmitted to a target node in the blockchain platform; The information transmission submodule is specifically used to: extract the transfer transaction information from the test operation; and send the transfer transaction information to the first node in the blockchain platform.
7. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
