diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-01-28 23:11:24 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-01-28 23:11:24 +0800 |
commit | 528dcc3814aa1ee5bfcf3812aa4085f45a6623c4 (patch) | |
tree | 89ee7b6627e61ab6af52f32abef5595ce34b926b /rpc | |
parent | ae1a137ce7daa885938e010dccd8436f8570329f (diff) | |
parent | 3750d835a1697f6784c727074cc959dda33cdcf3 (diff) | |
download | dexon-528dcc3814aa1ee5bfcf3812aa4085f45a6623c4.tar dexon-528dcc3814aa1ee5bfcf3812aa4085f45a6623c4.tar.gz dexon-528dcc3814aa1ee5bfcf3812aa4085f45a6623c4.tar.bz2 dexon-528dcc3814aa1ee5bfcf3812aa4085f45a6623c4.tar.lz dexon-528dcc3814aa1ee5bfcf3812aa4085f45a6623c4.tar.xz dexon-528dcc3814aa1ee5bfcf3812aa4085f45a6623c4.tar.zst dexon-528dcc3814aa1ee5bfcf3812aa4085f45a6623c4.zip |
Merge pull request #2151 from fjl/debug-api
internal/debug: APIs for profiling and tracing
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/javascript.go | 73 | ||||
-rw-r--r-- | rpc/json.go | 2 |
2 files changed, 73 insertions, 2 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: [ diff --git a/rpc/json.go b/rpc/json.go index 8bdb4665d..02bc71c26 100644 --- a/rpc/json.go +++ b/rpc/json.go @@ -48,7 +48,7 @@ type JSONRequest struct { type JSONSuccessResponse struct { Version string `json:"jsonrpc"` Id int64 `json:"id"` - Result interface{} `json:"result,omitempty"` + Result interface{} `json:"result"` } // JSON-RPC error object |