CN112506798A - Performance test method, device, terminal and storage medium of block chain platform - Google Patents

Performance test method, device, terminal and storage medium of block chain platform Download PDF

Info

Publication number
CN112506798A
CN112506798A CN202011526714.8A CN202011526714A CN112506798A CN 112506798 A CN112506798 A CN 112506798A CN 202011526714 A CN202011526714 A CN 202011526714A CN 112506798 A CN112506798 A CN 112506798A
Authority
CN
China
Prior art keywords
information
node
test operation
server
block chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011526714.8A
Other languages
Chinese (zh)
Inventor
蔡亮
李伟
匡立中
张帅
章人威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Priority to CN202011526714.8A priority Critical patent/CN112506798A/en
Publication of CN112506798A publication Critical patent/CN112506798A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application is applicable to the technical field of block chains, and provides a method, a device, a terminal and a storage medium for testing the performance of a block chain platform, wherein the method comprises the following steps: obtaining a test operation, and executing the test operation in a block chain platform; acquiring initial state information of a server in the block chain platform and state change information of the server in the test operation execution process; comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation; and displaying the performance analysis result. The scheme can ensure the correctness of the detection result and improve the reliability of the detection means.

Description

Performance test method, device, terminal and storage medium of block chain platform
Technical Field
The present application belongs to the field of block chain technology, and in particular, to a method, an apparatus, a terminal, and a storage medium for testing performance of a block chain platform.
Background
When the capabilities of the sub-blockchain platform are diverse, various promotions and descriptions may be overshadowed. The existing detection aiming at the block chain platform capability mainly takes a result as guidance, and particularly judges the performance of the platform according to a final display result of task execution of the block chain platform.
However, since a plurality of data nodes exist in the block chain platform, data may be tampered during the data processing, and therefore the accuracy of the detection result cannot be guaranteed by the existing detection method for the capability of the block chain platform, and the reliability of the detection means is low.
Disclosure of Invention
The embodiment of the application provides a performance testing method, a performance testing device, a performance testing terminal and a performance testing storage medium for a block chain platform, and aims to solve the problems that in the prior art, a detection method for the block chain platform capability cannot guarantee the correctness of a detection result, and the reliability of a detection means is low.
A first aspect of an embodiment of the present application provides a method for testing performance of a block chain platform, including:
obtaining a test operation, and executing the test operation in a block chain platform;
acquiring initial state information of a server in the block chain platform and state change information of the server in the test operation execution process;
comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation;
and displaying the performance analysis result.
A second aspect of the embodiments of the present application provides a performance testing apparatus for a block chain platform, including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a test operation and executing the test operation in a block chain platform;
the second acquisition module is used for acquiring initial state information of a server in the block chain platform and state change information of the server in the test operation execution process;
the third obtaining module is used for comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation;
and the display module is used for displaying the performance analysis result.
A third aspect of embodiments of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, performs the steps of the method according to the first aspect.
A fifth aspect of the present application provides a computer program product, which, when run on a terminal, causes the terminal to perform the steps of the method of the first aspect described above.
As can be seen from the above, in the embodiment of the present application, by executing the obtained test operation in the block chain platform, obtaining the initial state information of the server in the block chain platform and the state change information of the server in the test operation execution process, comparing the state change information with the initial state information, obtaining and displaying a performance analysis result corresponding to the test operation, and monitoring the state of the server in the block chain platform, implementing the test on the actual task processing capability of the block chain platform in the test task execution process, so as to obtain and analyze the substantial data processing performance of each distributed data node in the block chain platform, ensure the correctness of the test result, and improve the reliability of the detection means.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a first flowchart of a method for testing performance of a block chain platform according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for testing performance of a block chain platform according to an embodiment of the present disclosure;
fig. 3 is a structural diagram of a performance testing apparatus for a blockchain platform according to an embodiment of the present disclosure;
fig. 4 is a structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the terminals described in embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having 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 is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a terminal that includes 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.
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 disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the terminal may 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 respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
It should be understood that, the sequence numbers of the steps in this embodiment do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation to the implementation process of the embodiment of the present application.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a first flowchart of a method for testing performance of a blockchain platform according to an embodiment of the present disclosure. As shown in fig. 1, a method for testing performance of a block chain platform includes the following steps:
step 101, obtaining a test operation and executing the test operation in a block chain platform.
The test operation is, for example, an operation capable of affecting a server in the blockchain platform, such as a transfer of data between nodes, an addition or deletion of a node, a modification or deletion of data in a node, and the like.
In this step, a tester needs to first obtain the operation permission of the block chain platform, and perform a targeted test operation on the block chain platform.
The obtaining of the test operation may specifically be reading a test operation configured in a preset test configuration file, so as to implement an automated test execution process. Or the test operation is acquired by receiving configuration input from a tester.
Step 102, acquiring initial state information of a server in a block chain platform and state change information of the server in a test operation execution process.
The initial state information and the state change information may be related information of states such as a usage rate, a memory usage condition, a data transfer condition, and input/output in the server. The initial state information is specifically acquired by monitoring the server before the test operation is executed, or acquired by monitoring the server at the initial execution stage of the test operation.
After the test operation is executed, a corresponding change of the server state is caused, and the change of the state can be captured by a hardware detection tool carried by the server or an additionally arranged state detection tool, such as a network packet capture tool and the like.
The capability of the blockchain platform is detected by monitoring the influence of various test operations performed on the blockchain platform on the server.
The generation of the state change information of the server in the test operation execution process includes, for example, data transmission in the consensus process of the blockchain nodes, network fluctuation, and changes of various state indexes of the server, and the consensus ability of the blockchain platform can be judged by acquiring the state change information of the server.
The problem can be fundamentally solved by directly detecting the change of the state of the server where the block chain platform is located, the change of data and the like, so that the capability detection of the block chain platform is realized.
And 103, comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation.
In the process, the initial state information forms reference data of the state change information, the state change information and the initial state information are compared, whether the state change information and the initial state information are the same or not is obtained through comparison, if the state change information and the initial state information are not the same, the difference degree can be obtained, then the task processing capacity and the processing effect when the block chain platform executes the test task are obtained, and the corresponding performance analysis result is obtained.
In the process, whether the block chain has the capability corresponding to the test operation is determined according to the analysis result. The capacity of the block chain platform is judged or assisted by directly verifying the change of the state of the server, and the capacity of the block chain platform is verified by penetrating into the level of an operating system, so that the reliability is high, and the reliability of performance test is improved.
And 104, displaying the performance analysis result.
After the state information analysis is finished, the performance analysis result can be displayed through the display module, so that a tester can optimize the block chain platform by combining the performance analysis result.
In the embodiment of the application, the obtained test operation is executed in the block chain platform, the initial state information of the server in the block chain platform and the state change information of the server in the test operation execution process are obtained, the state change information is compared with the initial state information, a performance analysis result corresponding to the test operation is obtained and displayed, the actual task processing capacity of the block chain platform in the test task execution process is tested by monitoring the state of the server in the block chain platform, the substantive data processing performance can be obtained and analyzed for each distributed data node in the block chain platform, the correctness of the test result is ensured, and the reliability of the detection means is improved.
The embodiment of the application also provides different implementation modes of the performance test method of the block chain platform.
Referring to fig. 2, fig. 2 is a flowchart of a performance testing method for a blockchain platform according to an embodiment of the present disclosure. As shown in fig. 2, a method for testing performance of a blockchain platform includes the following steps:
step 201, obtaining a test operation, obtaining information to be transmitted according to the test operation, and sending the information to be transmitted to a target node in a block chain platform.
The information to be transmitted is used for transmitting among the nodes in the block chain platform, so that the performance of each node in the block chain platform is detected through the transmission process of the information to be transmitted.
Step 202, acquiring initial state information of the server in the block chain platform and state change information of the server in the test operation execution process.
In the execution process of step 201 and step 202, as an optional implementation, step 201 may include:
extracting transfer transaction information from the test operation; and sending the transfer transaction information to a first node in the blockchain platform.
The first node is the target node. The transfer transaction information is the information to be transferred.
Correspondingly, step 202 includes:
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 block chain platform in a consensus mode, the transfer transaction information transmitted by the server where the first node is located in the consensus transmission process is subjected to packet capturing operation, and state change information is obtained.
And when the test operation is that the first node needs to perform consensus on the transfer transaction information among all 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 the transfer transaction information to other nodes in the blockchain platform, and the consensus among the nodes is realized.
The consensus transmission refers to information transmission among nodes in a block chain platform so as to achieve node consensus among the nodes.
In the process, the identified transfer transaction information becomes initial information which exists locally before the server where the first node is located performs consensus transmission to other nodes, and therefore the identified transfer transaction information is used as initial state information of the server where the first node is located. Because the server where the first node is located needs to undertake the execution of the data consensus transmission task, the transfer transaction information may be changed in data forms such as a packaging structure or encryption in the data transmission process, and the transfer transaction information transmitted by the server where the first node is located in the consensus transmission process is subjected to packet capturing to obtain state change information corresponding to the transfer transaction information.
Therefore, the initial state information before the server where the first node is located performs data consensus transmission and the state change information in the data consensus transmission process are respectively acquired.
Specifically, this process is exemplified.
For example, when performing the message consensus transmission between the blockchain nodes of the blockchain platform, encrypted transmission is required, and four nodes of one chain are respectively a node one, a node two, a node three, and a node four.
The tester sends a piece of transfer transaction information to the node, the transfer transaction information is plaintext information, and the node recognizes the transaction to other three nodes after receiving the transaction information.
The tester captures the transfer transaction information in the process of consensus transmission from the server of the node I to other nodes, specifically, the tester captures the transfer transaction information from the information output channel of the server of the node I, or captures the consensus information of the transaction from the information input channels of the servers of the node II, the node III and the node IV to obtain the state change information.
Through comparison of the initial state information and the state change information, when the data forms of the state change information and the state change information are judged to be inconsistent, the encrypted transmission of the information is judged to be realized through the processing of the server where the node I is located, and if the data forms of the node I and the server are consistent, the encrypted transmission operation is not carried out in the commonly-identified engineering by the block chain platform.
On the other hand, in the execution process of step 201 and step 202, as an optional implementation, step 201 may include:
determining a newly added node in the block chain platform according to the node adding operation, and determining node data of a second node in the block chain platform as information to be transmitted; and sending the node data to the newly added node.
The test operation is a node add operation. When node adding operation is executed, the node data of the nodes in the block chain platform needs to be commonly transmitted to the newly added nodes. The newly added node is the target node.
Correspondingly, step 202 includes:
acquiring a first CPU utilization rate of a server where a newly added node is located before node data is sent to the newly added node, and taking the first CPU utilization rate as initial state information when the first CPU utilization rate is determined to be smaller than a threshold value; and acquiring the second CPU utilization rate of the server where the newly added node is located in the process of sending the node data to the newly added node, and taking the second CPU utilization rate as state change information.
The server where the new node is located can generate the change of the utilization rate before and after the server obtains the node data. And judging whether the node is successfully added in the block chain platform or not, and judging the data processing and data synchronization efficiency of the newly added node under the successful condition by the utilization rate.
When the first CPU usage is used as the initial state information, it is necessary to ensure that the first CPU usage is smaller than a threshold, for example, one percent, so as to ensure that no service that would generate a large CPU computation amount exists on the server by detecting the usage of a CPU (central processing Unit) in the server, specifically, at this time, the first CPU usage is, for example, zero percent.
Further, the new node in the process may also be the first node mentioned in the previous embodiment.
Specifically, this process is exemplified.
For example, the blockchain platform has the capability of newly adding node consensus data during normal use, and four nodes of a chain are respectively a node one, a node two, a node three and a node four. At this time, an operation of adding a node five is performed.
And when judging whether the node adding operation is successful, directly inquiring whether the consensus data exists on the node five after the data consensus transmission operation is finished. And the auxiliary judgment can be carried out by detecting the service condition of the server where the node five is located. The usage of the server of node five is detected before operation, and if no service exists on the server, which would generate a large amount of computation, the usage of the server at this time is zero percent. After the operation of the newly added node is executed to perform data consensus transmission, the utilization rate of the server where the node five is located is detected again, because the node five consensus data needs a large amount of calculation, if the change of the utilization rate of the server in the consensus process is not captured, the node newly added failure or no consensus can be directly judged. On the contrary, if the change of the utilization rate of the server where the node five is located is captured in the consensus process, and then the consensus data is inquired in the node five, the reliability of the detection result can be greatly increased, and meanwhile, the acquisition of the data processing performance of the newly added node can be realized according to the change of the utilization rate of the server.
Step 203, comparing the state change information with the initial state information to obtain a comparison result.
Step 204, 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 an execution failure; and if the comparison result indicates that the current state of the server is inconsistent with the initial state, analyzing the state index corresponding to the state change information to obtain a performance execution result of the test operation.
The current state is the state of the server after the state change of the server where the newly added node is located due to the fact that the server receives the node data, and the current state is obtained based on the state change information. The initial state is a 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 that the current state of the server is consistent with the initial state can be obtained at the moment, and the result shows that the server is not influenced by the test task, the test task is not executed or a fault occurs in the execution process, and at the moment, the performance analysis result corresponding to the task test operation is execution failure and the performance is poor.
When the state change information is inconsistent with the initial state information, a comparison result that the current state of the server is inconsistent with the initial state can be obtained at the moment, the server is indicated to execute the test task, and the state index corresponding to the state change information can be analyzed at the moment to obtain a performance execution result of the test operation. The status indicator is, for example, execution duration, data throughput rate, memory occupancy, and the like.
Step 205, displaying the performance analysis result.
Here, the performance analysis result is an execution failure or a performance execution result of the test operation obtained by the analysis. And after comparison, displaying the result obtained by comparison.
The implementation process of this step is the same as that of step 104 in the foregoing embodiment, and is not described here again.
In the embodiment of the application, the information to be transmitted is obtained based on the test operation, the information to be transmitted is sent to the target node in the block chain platform, the initial state information of the server in the block chain platform and the state change information of the server in the test operation execution process are obtained, the state change information is compared with the initial state information, and if the current state of the server is determined to be consistent with the initial state, the performance analysis result corresponding to the test operation is determined to be failed to execute; if the current state of the server is determined to be inconsistent with the initial state, analyzing the state indexes corresponding to the state change information to obtain a performance execution result of the test operation, comparing and displaying the result, and monitoring the state of the server in the block chain platform to realize the test of the actual task processing capacity of the block chain platform in the test task execution process so as to obtain and analyze the substantive data processing performance of each distributed data node in the block chain platform, ensure the correctness of the detection result and improve the reliability of the detection means.
Referring to fig. 3, fig. 3 is a structural diagram of a performance testing apparatus for a blockchain platform according to an embodiment of the present disclosure, and for convenience of description, only a portion related to the embodiment of the present disclosure is shown.
The performance testing apparatus 300 for a block chain platform includes:
a first obtaining module 301, configured to obtain a test operation, where the test operation is executed in a block chain platform;
a second obtaining module 302, configured to obtain initial state information of a server in the blockchain platform and state change information of the server in the test operation execution process;
a third obtaining module 303, configured 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 304, configured to display the performance analysis result.
A first obtaining module 301, comprising:
and the information transmission submodule is used for acquiring information to be transmitted according to the test operation and sending the information to be transmitted to a target node in the block chain platform.
Specifically, the information delivery sub-module is specifically configured to:
extracting transfer transaction information from the test operation;
and sending the transfer transaction information to a first node in the blockchain platform.
The second obtaining module 302 is specifically configured to:
taking the transfer transaction information as initial state information of a server where the first node is located;
and when the first node transmits the transfer transaction information to other nodes in the block chain platform in a consensus mode, executing packet capturing operation on the transfer transaction information transmitted by a server where the first node is located in the consensus transmission process to obtain the state change information.
The information delivery submodule is further specifically configured to:
determining a newly added node in the block chain platform according to node adding operation, and determining node data of a second node in the block chain platform as information to be transmitted;
and sending the node data to the newly added node.
Correspondingly, the second obtaining module 302 is further specifically configured to:
acquiring the utilization rate of a first CPU of a server where the newly added node is located before the node data is sent to the newly added node;
when the first CPU utilization rate is determined to be smaller than a threshold value, taking the first CPU utilization rate as the initial state information;
and acquiring the utilization rate of a second CPU of the server where the newly added node is located in the process of sending the node data to the newly added node, and taking the utilization rate of the second CPU as the state change information.
A third obtaining module, specifically configured to:
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;
and if the comparison result indicates that the current state of the server is inconsistent with the initial state, analyzing a state index corresponding to the state change information to obtain a performance execution result of the test operation.
The performance testing device for the block chain platform provided in the embodiment of the application can realize each process of the embodiment of the performance testing method for the block chain platform, and can achieve the same technical effect, and is not repeated here to avoid repetition.
Fig. 4 is a structural diagram of a terminal according to an embodiment of the present application. As shown in the figure, the terminal 4 of this embodiment includes: at least one processor 40 (only one shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, the steps of any of the various method embodiments described above being implemented when the computer program 42 is executed by the processor 40.
The terminal 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal 4 may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is only an example of a terminal 4 and does not constitute a limitation of terminal 4 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal may also include input output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the terminal 4, such as a hard disk or a 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 memory Card (Flash Card) and the like provided 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 for storing 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.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described apparatus/terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The present application realizes all or part of the processes in the method of the above embodiments, and may also be implemented by a computer program product, when the computer program product runs on a terminal, the steps in the above method embodiments may be implemented when the terminal executes the computer program product.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for testing performance of a blockchain platform includes:
obtaining a test operation, and executing the test operation in a block chain platform;
acquiring initial state information of a server in the block chain platform and state change information of the server in the test operation execution process;
comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation;
and displaying the performance analysis result.
2. The method of claim 1, wherein performing the test operation in a blockchain platform comprises:
and obtaining information to be transmitted according to the test operation, and sending the information to be transmitted to a target node in the block chain platform.
3. The method of claim 2, wherein the obtaining information to be transferred according to the test operation and sending the information to be transferred to a target node in the block chain platform comprises:
extracting transfer transaction information from the test operation;
and sending the transfer transaction information to a first node in the blockchain platform.
4. The method of claim 3, wherein the obtaining initial state information of the servers in the blockchain platform and state change information of the servers during the test operation execution comprises:
taking the transfer transaction information as initial state information of a server where the first node is located;
and when the first node transmits the transfer transaction information to other nodes in the block chain platform in a consensus mode, executing packet capturing operation on the transfer transaction information transmitted by a server where the first node is located in the consensus transmission process to obtain the state change information.
5. The method of claim 2, wherein the obtaining information to be transferred according to the test operation and sending the information to be transferred to a target node in the block chain platform comprises:
determining a newly added node in the block chain platform according to node adding operation, and determining node data of a second node in the block chain platform as information to be transmitted;
and sending the node data to the newly added node.
6. The method of claim 5, wherein obtaining initial state information of servers in the blockchain platform and state change information of the servers during the test operation comprises:
acquiring the utilization rate of a first CPU of a server where the newly added node is located before the node data is sent to the newly added node;
when the first CPU utilization rate is determined to be smaller than a threshold value, taking the first CPU utilization rate as the initial state information;
and acquiring the utilization rate of a second CPU of the server where the newly added node is located in the process of sending the node data to the newly added node, and taking the utilization rate of the second CPU as the state change information.
7. The method according to any one of claims 1 to 6, wherein 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;
and if the comparison result indicates that the current state of the server is inconsistent with the initial state, analyzing a state index corresponding to the state change information to obtain a performance execution result of the test operation.
8. A performance testing apparatus for a blockchain platform, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a test operation and executing the test operation in a block chain platform;
the second acquisition module is used for acquiring initial state information of a server in the block chain platform and state change information of the server in the test operation execution process;
the third obtaining module is used for comparing the state change information with the initial state information to obtain a performance analysis result corresponding to the test operation;
and the display module is used for displaying the performance analysis result.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202011526714.8A 2020-12-22 2020-12-22 Performance test method, device, terminal and storage medium of block chain platform Pending CN112506798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011526714.8A CN112506798A (en) 2020-12-22 2020-12-22 Performance test method, device, terminal and storage medium of block chain platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011526714.8A CN112506798A (en) 2020-12-22 2020-12-22 Performance test method, device, terminal and storage medium of block chain platform

Publications (1)

Publication Number Publication Date
CN112506798A true CN112506798A (en) 2021-03-16

Family

ID=74923104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011526714.8A Pending CN112506798A (en) 2020-12-22 2020-12-22 Performance test method, device, terminal and storage medium of block chain platform

Country Status (1)

Country Link
CN (1) CN112506798A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989422A (en) * 2021-04-01 2021-06-18 北京微芯感知科技有限公司 Block chain system assembling method and device, electronic equipment and storage medium
CN114741323A (en) * 2022-06-10 2022-07-12 中国信息通信研究院 Block chain performance testing method and device, electronic equipment and storage medium
CN115269358A (en) * 2022-09-30 2022-11-01 中国信息通信研究院 Performance test method, device, equipment and medium for block chain service node host
CN112989422B (en) * 2021-04-01 2024-06-07 北京微芯感知科技有限公司 Block chain system assembling method, device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9934138B1 (en) * 2016-12-07 2018-04-03 International Business Machines Corporation Application testing on a blockchain
CN109542767A (en) * 2018-10-25 2019-03-29 平安科技(深圳)有限公司 Automated testing method, device, computer equipment and storage medium based on block chain
CN109753434A (en) * 2018-12-26 2019-05-14 中链科技有限公司 Performance test methods, device, electronic equipment and storage medium based on block chain
CN110580206A (en) * 2019-09-16 2019-12-17 上海保险交易所股份有限公司 Method, medium and control device for pressure testing of a blockchain system
CN110752969A (en) * 2019-10-21 2020-02-04 腾讯科技(深圳)有限公司 Performance detection method, device, equipment and medium
CN111309594A (en) * 2020-01-17 2020-06-19 腾讯科技(深圳)有限公司 System testing method, device, equipment and storage medium
US20200242591A1 (en) * 2019-01-24 2020-07-30 Volkan Sevindik Network Performance Testing with Blockchain
CN111752850A (en) * 2020-07-13 2020-10-09 腾讯科技(深圳)有限公司 Method and related equipment for testing block chain system
US20200327030A1 (en) * 2019-04-15 2020-10-15 Fujitsu Limited Device for testing blockchain network

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9934138B1 (en) * 2016-12-07 2018-04-03 International Business Machines Corporation Application testing on a blockchain
CN109542767A (en) * 2018-10-25 2019-03-29 平安科技(深圳)有限公司 Automated testing method, device, computer equipment and storage medium based on block chain
CN109753434A (en) * 2018-12-26 2019-05-14 中链科技有限公司 Performance test methods, device, electronic equipment and storage medium based on block chain
US20200242591A1 (en) * 2019-01-24 2020-07-30 Volkan Sevindik Network Performance Testing with Blockchain
US20200327030A1 (en) * 2019-04-15 2020-10-15 Fujitsu Limited Device for testing blockchain network
CN110580206A (en) * 2019-09-16 2019-12-17 上海保险交易所股份有限公司 Method, medium and control device for pressure testing of a blockchain system
CN110752969A (en) * 2019-10-21 2020-02-04 腾讯科技(深圳)有限公司 Performance detection method, device, equipment and medium
CN111309594A (en) * 2020-01-17 2020-06-19 腾讯科技(深圳)有限公司 System testing method, device, equipment and storage medium
CN111752850A (en) * 2020-07-13 2020-10-09 腾讯科技(深圳)有限公司 Method and related equipment for testing block chain system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
周鸣爱;: "区块链测试技术研究", 网络空间安全, no. 07, 25 July 2020 (2020-07-25) *
王阅军;卫文学;: "基于loadrunner物流信息交易平台的性能测试与改进", 电脑知识与技术, vol. 12, no. 07, 31 March 2016 (2016-03-31) *
邓晓宇;: "一种区块链测试管理平台设计", 通讯世界, no. 01, 25 January 2020 (2020-01-25) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989422A (en) * 2021-04-01 2021-06-18 北京微芯感知科技有限公司 Block chain system assembling method and device, electronic equipment and storage medium
CN112989422B (en) * 2021-04-01 2024-06-07 北京微芯感知科技有限公司 Block chain system assembling method, device, electronic equipment and storage medium
CN114741323A (en) * 2022-06-10 2022-07-12 中国信息通信研究院 Block chain performance testing method and device, electronic equipment and storage medium
CN115269358A (en) * 2022-09-30 2022-11-01 中国信息通信研究院 Performance test method, device, equipment and medium for block chain service node host

Similar Documents

Publication Publication Date Title
CN110225104B (en) Data acquisition method and device and terminal equipment
US20210081950A1 (en) Method and apparatus for identifying identity information
CN109359118B (en) Data writing method and device
CN107276851B (en) Node abnormity detection method and device, network node and console
CN112506798A (en) Performance test method, device, terminal and storage medium of block chain platform
CN110244963B (en) Data updating method and device and terminal equipment
CN111198797A (en) Operation monitoring method and device and operation analysis method and device
CN112751920B (en) Block chain-based network interaction behavior evidence obtaining method and device and terminal
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN112711955A (en) NFC information transmission method, NFC information transmission device and NFC terminal
CN109586788B (en) Monitoring system fault diagnosis method and device, computer equipment and storage medium
CN116955198A (en) Rule set determining method and device
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN111309511A (en) Application running data processing method and device and terminal
CN112379967B (en) Simulator detection method, device, equipment and medium
CN115688112A (en) Industrial control risk assessment method, device, equipment and storage medium
CN114443480A (en) Test method, test system, readable medium and electronic device
CN113765924A (en) Safety monitoring method, terminal and equipment based on cross-server access of user
CN115941432A (en) Domain name alarm information sending method and device, electronic equipment and computer readable storage medium
CN111489184A (en) Method, device, server, client and medium for verifying click behavior
CN116582310A (en) Block chain system anomaly detection method, device, terminal and storage medium
CN110008706B (en) Host security state management method and device and terminal equipment
CN110162479B (en) Abnormal application detection method and device and terminal equipment
CN110875876B (en) Electronic red packet identification method, electronic red packet identification device and mobile terminal
US20240104085A1 (en) Computer system and method for evaluating integrity and parsing of a file system and parsing implementation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination