aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-01-26 21:39:21 +0800
committerFelix Lange <fjl@twurst.com>2016-01-28 20:36:11 +0800
commit3750d835a1697f6784c727074cc959dda33cdcf3 (patch)
tree6183747f1ce69b6bb1ed256e4dd9a1bba0031d69 /rpc
parente287b56b69cdf8340f679e9cfd229c959cc45e24 (diff)
downloaddexon-3750d835a1697f6784c727074cc959dda33cdcf3.tar.gz
dexon-3750d835a1697f6784c727074cc959dda33cdcf3.tar.zst
dexon-3750d835a1697f6784c727074cc959dda33cdcf3.zip
internal/debug: APIs for profiling and tracing
The debug package provides an RPC wrapper for glog settings and the debugging facilities of the Go runtime. They can be triggered through both command line flags and the IPC listener.
Diffstat (limited to 'rpc')
-rw-r--r--rpc/javascript.go73
1 files changed, 72 insertions, 1 deletions
diff --git a/rpc/javascript.go b/rpc/javascript.go
index d147aa045..9e3b2218b 100644
--- a/rpc/javascript.go
+++ b/rpc/javascript.go
@@ -327,7 +327,78 @@ web3._extend({
name: 'metrics',
call: 'debug_metrics',
params: 1
- })
+ }),
+ new web3._extend.Method({
+ name: 'verbosity',
+ call: 'debug_verbosity',
+ params: 1
+ }),
+ new web3._extend.Method({
+ name: 'vmodule',
+ call: 'debug_vmodule',
+ params: 1
+ }),
+ new web3._extend.Method({
+ name: 'backtraceAt',
+ call: 'debug_backtraceAt',
+ params: 1,
+ }),
+ new web3._extend.Method({
+ name: 'stacks',
+ call: 'debug_stacks',
+ params: 0,
+ outputFormatter: console.log
+ }),
+ new web3._extend.Method({
+ name: 'cpuProfile',
+ call: 'debug_cpuProfile',
+ params: 2
+ }),
+ new web3._extend.Method({
+ name: 'startCPUProfile',
+ call: 'debug_startCPUProfile',
+ params: 1
+ }),
+ new web3._extend.Method({
+ name: 'stopCPUProfile',
+ call: 'debug_stopCPUProfile',
+ params: 0
+ }),
+ new web3._extend.Method({
+ name: 'trace',
+ call: 'debug_trace',
+ params: 2
+ }),
+ new web3._extend.Method({
+ name: 'startTrace',
+ call: 'debug_startTrace',
+ params: 1
+ }),
+ new web3._extend.Method({
+ name: 'stopTrace',
+ call: 'debug_stopTrace',
+ params: 0
+ }),
+ new web3._extend.Method({
+ name: 'blockProfile',
+ call: 'debug_blockProfile',
+ params: 2
+ }),
+ new web3._extend.Method({
+ name: 'setBlockProfileRate',
+ call: 'debug_setBlockProfileRate',
+ params: 1
+ }),
+ new web3._extend.Method({
+ name: 'writeBlockProfile',
+ call: 'debug_writeBlockProfile',
+ params: 1
+ }),
+ new web3._extend.Method({
+ name: 'writeMemProfile',
+ call: 'debug_writeMemProfile',
+ params: 1
+ }),
],
properties:
[