forked from cerc-io/laconicd-deprecated
rpc: implement internal debug_ API namespace functions (#313)
* API Hello World * Added all the debug functions + more data to try implementing the GC functions * Getting transactions information * Added cpu profile first approach functions * new struct for cpuprofile and read filename from params * cpuprofile, gcstats and memstats * added comment * All endpoints returns error instead of string * Code cleanup * Changed errors messages to match go-eth returns * Removed activated flag and just using the file to check if it's running * Added new endpoints to the json_rpc.md file * GoTrace debug endpoints added * Block profile endpoint added * missing goeth calls * added debug logs * divide debug and internal api * Using ExpandHome on server configuration * Added rpc changes to changelog * Logging go trace status * Removed logger functions and moved logger errors to debug * Added more logs to go trace * Added more datailed changelog * Removed trace debug api interface * added comments * cleanup * Updated changelog * disable lint on cpuprofile rename Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * return error in StopCpuProfile Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * return error in StopGoTrace Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * implement suggested changes Co-authored-by: ramacarlucho <ramirocarlucho@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze Küllmer
ramacarlucho
parent
c67b4b1c37
commit
282eb13a6f
+3
-2
@@ -40,6 +40,7 @@ import (
|
||||
|
||||
"github.com/tharsis/ethermint/cmd/ethermintd/config"
|
||||
"github.com/tharsis/ethermint/ethereum/rpc"
|
||||
ethdebug "github.com/tharsis/ethermint/ethereum/rpc/namespaces/debug"
|
||||
)
|
||||
|
||||
// Tendermint full-node start flags
|
||||
@@ -339,9 +340,9 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty
|
||||
var cpuProfileCleanup func()
|
||||
|
||||
if cpuProfile := ctx.Viper.GetString(flagCPUProfile); cpuProfile != "" {
|
||||
f, err := os.Create(cpuProfile)
|
||||
f, err := os.Create(ethdebug.ExpandHome(cpuProfile))
|
||||
if err != nil {
|
||||
logger.Error("failed to create CP profile", "error", err.Error())
|
||||
logger.Error("failed to create CPU profile", "error", err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user