You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the harmony node's Pprof service with some advanced developer options.
Context
Pprof is a golang tool for resource profiling, e.g. CPU, memory, goroutine, e.t.c, which is powerful for developer to discover and resolve performance and memory leak issues.
If a developer want to do pprof on a certain machine, an additional port (default as 6060) is needed to be opened. This will add potential risk to the network security.
The profiling over HTTP is runtime, which means some critical data of some historic period can be missing, making it hard to debug and reproduce the problematic scenario.
Thus, an extended version of pprof service is needed.
Requested features
The extended version pprof service should have the following features:
Other than profiling over HTTP, periodically dump all kinds of pprof data to local disk according to user settings.
Add flags for pprof parameters to cmd as necessary.
Add fields of pprof parameters to harmony.conf (code) which is the config file loaded when starting node.
Add harmony.conf migration logic for pprof new fields to enable backward compatibility for loading config file of old version. (Reference)
Suggested approach
It would be suggested to build pprof into a self-organized module, and add it to service.Manager. If you have any better approach, any discussions are welcomed.
Acceptance Criteria
Build a pprof module, registered into service.Manager.
Pprof can provide profiling over HTTP (as the current implementation).
Pprof can dump data files to local disk periodically as user settings.
Add cmd flags as necessary. Some very detailed flags should be hidden from --help message for non-developer users.
Update harmony.conf data structure and add config file migration logic for old versioned config file.
All changes are backward compatible.
Fix existing unit test cases as necessary. Unit test coverage >=80% for new code.
A complete manual / cheatsheet of how to do analysis / visualization through both HTTP and dumped pprof files.
Description
Extend the harmony node's Pprof service with some advanced developer options.
Context
Pprof is a golang tool for resource profiling, e.g. CPU, memory, goroutine, e.t.c, which is powerful for developer to discover and resolve performance and memory leak issues.
Currently, Harmony program only support profiling over HTTP connection. This results in two limitations:
Thus, an extended version of pprof service is needed.
Requested features
The extended version pprof service should have the following features:
harmony.conf
(code) which is the config file loaded when starting node.harmony.conf
migration logic for pprof new fields to enable backward compatibility for loading config file of old version. (Reference)Suggested approach
It would be suggested to build
pprof
into a self-organized module, and add it toservice.Manager
. If you have any better approach, any discussions are welcomed.Acceptance Criteria
service.Manager
.Pprof
can provide profiling over HTTP (as the current implementation).Pprof
can dump data files to local disk periodically as user settings.--help
message for non-developer users.harmony.conf
data structure and add config file migration logic for old versioned config file.Reward
USD $3,000 equivalent of Harmony ONE token.
The text was updated successfully, but these errors were encountered: