Block chain performance detection method and system based on pre-compiled contract
A detection method and pre-compiled technology, applied in the field of blockchain, can solve problems such as not wanting to install system modules, unable to monitor blockchain groups, and unable to form effective monitoring of node system performance, so as to achieve the effect of convenient deployment, operation and maintenance
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] Such as figure 1 with figure 2 As shown, the present disclosure provides a block chain performance detection method based on the precompiled contract, including the following steps:
[0032] S1: Write a C ++ pre-compilation contract, get the entire machine CPU, memory, disk, network transmission, etc.
[0033] S1.1: CPU usage calculation:
[0034] (a): Sampling from / Proc / Stat Sample two sufficiently short intervals of CPU snapshots, respectively 1 , T 2 Where t 1 T 2 The structure is: (User, Nice, System, Idle, Iowait, IRQ, Softirq, Stealstolen, Guest);
[0035] (b): Calculate the total CPU time TOTALCPUTIME
[0036] Seek all the first CPU usage, get S 1 , Seek all the use of all CPUs for the second time, get S 2 , S 2 -S 1 Get all time films within this time interval, ie Total CPUTime = S 2 -S 1 ;
[0037] (c) Calculate idle time IDLE, such as IDLE corresponding to the data of the nth column, using the second Numn N columns:
[0038] IDLE = Second Number N Column - The...
Embodiment 2
[0053] The present disclosure provides a block chain performance detection system based on the precompiled contract, including:
[0054] The data acquisition module is configured to obtain the process PID data of the current node;
[0055]The data processing module is configured to: obtain the CPU, memory, disk, and network transfer data of the current node thread, to obtain the monitoring data of the current node under the current process by using the precompiled contract contract within the node.
[0056] The block chain performance detection module is configured to: through each node consensus, each node saves all node performance data, gathering the monitoring data of each node, resulting in the final block chain performance test results.
[0057] The working method of the system is the same as the block chain performance detection method based on the precompiled contract provided by Example 1, and details are not described herein again.
Embodiment 3
[0059] The present disclosure Embodiment 3 provides a computer readable storage medium, which stores a program, which is performed when executed by the processor, implemented in the precompiled contract chain performance detection method according to Embodiment 1 of the present disclosure. The steps are:
[0060] Get the process PID data of the current node;
[0061] According to the acquired process PID data, use the precompiled contract within the node to obtain the CPU, memory, disk, and network transfer data of the current node thread, and get the monitoring data of the current node under the current process;
[0062] Through each node consensus, each node saves all node performance data to gather monitoring data for each node to obtain the final block chain performance test results.
[0063] The detailed steps are the same as the block chain performance detection method based on the precompiled contract based on the first embodiment, and details are not described herein.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com