harmony-one / bounties

Bounty program is to help the community take part in the development of the Harmony blockchain. It covers from core feature to validator tooling, from dApp development to DeFi integration.
MIT License
59 stars 23 forks source link

Pprof module extension #46

Open JackyWYX opened 3 years ago

JackyWYX commented 3 years ago

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:

  1. 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.
  2. 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:

  1. Other than profiling over HTTP, periodically dump all kinds of pprof data to local disk according to user settings.
  2. Add flags for pprof parameters to cmd as necessary.
  3. Add fields of pprof parameters to harmony.conf (code) which is the config file loaded when starting node.
  4. 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

Reward

USD $3,000 equivalent of Harmony ONE token.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 29298.8405 ONE (3008.9 USD @ $0.1/ONE) attached to it.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 month, 3 weeks from now. Please review their action plans below:

1) yashagarwal9 has started work.

Will Update

Learn more on the Gitcoin Issue Details page.

19Clemente92 commented 3 years ago

nice