Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Perf] Profiling flags #1246

Merged
merged 1 commit into from
Oct 23, 2023
Merged

[Perf] Profiling flags #1246

merged 1 commit into from
Oct 23, 2023

Conversation

lovromazgon
Copy link
Member

Description

This PR adds hidden development flags that allow us to gather the CPU and memory profile of Conduit. The flags are hidden from normal users in the help usage. They are only shown if you run conduit with flags -dev -help:

$ conduit -dev -help
Usage of conduit:
  -dev.cpuprofile string
    	write cpu profile to file
  -dev.memprofile string
    	write memory profile to file

Conduit can now be executed with these flags to enable profiling:

conduit -dev.cpuprofile cpu.prof -dev.memprofile mem.prof

See https://pkg.go.dev/runtime/pprof for more info about profiling.

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@lovromazgon lovromazgon requested a review from a team as a code owner October 20, 2023 19:17
@lovromazgon lovromazgon merged commit ce7bb3a into main Oct 23, 2023
3 checks passed
@lovromazgon lovromazgon deleted the lovro/dev-flags-profiling branch October 23, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants