mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
feat: expose internal debug API handler (#255)
## Why this should be merged This allows exposing a number of APIs exposed by Geth's [`debug` namespace](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug). Specifically: - [debug_blockProfile](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugblockprofile) - [debug_cpuProfile ](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugcpuprofile) - [debug_freeOSMemory ](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugfreeosmemory) - [debug_gcStats](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debuggcstats) - [debug_goTrace ](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debuggotrace) - [debug_memStats](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugmemstats) - [debug_mutexProfile](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugmutexprofile) - [debug_setBlockProfileRate](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugsetblockprofilerate) - [debug_setGCPercent](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugsetgcpercent) - [debug_setMutexProfileFraction](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugsetmutexprofilefraction) - [debug_stacks](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugstacks) - [debug_startCPUProfile](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugstartcpuprofile) - [debug_startGoTrace](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugstartgotrace) - [debug_stopCPUProfile](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugstopcpuprofile) - [debug_stopGoTrace](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugstopgotrace) - [debug_verbosity](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugverbosity) - [debug_vmodule](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugvmodule) - [debug_writeBlockProfile](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugwriteblockprofile) - [debug_writeMemProfile](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugwritememprofile) - [debug_writeMutexProfile](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugwritemutexprofile) Note: This is _not_ the full debug namespace. ## How this works Simply re-exports the API, similarly to how the `ethapi`s are re-exported. ## How this was tested N/A
This commit is contained in:
parent
d8ff026f89
commit
a13de95b66
1 changed files with 23 additions and 0 deletions
23
libevm/debug/api.go
Normal file
23
libevm/debug/api.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2026 the libevm authors.
|
||||
//
|
||||
// The libevm additions to go-ethereum are free software: you can redistribute
|
||||
// them and/or modify them under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation, either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// The libevm additions are distributed in the hope that they will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
|
||||
// General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Package debug exposes the internal debug package.
|
||||
package debug
|
||||
|
||||
import "github.com/ava-labs/libevm/internal/debug"
|
||||
|
||||
// Handler is the debug API handler for tracking process level statistics.
|
||||
var Handler = debug.Handler
|
||||
Loading…
Reference in a new issue