-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: iavl, db & disk stats logging #352
Conversation
Codecov Report
@@ Coverage Diff @@
## main #352 +/- ##
=======================================
Coverage ? 53.12%
=======================================
Files ? 643
Lines ? 67322
Branches ? 0
=======================================
Hits ? 35768
Misses ? 28608
Partials ? 2946 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
Wouldn't it affect performance to open and parse the file every commit? How about to create a config for turning it off and turning it on? |
It's just string pointer comparisons. If it's uninitialized, i.e. logIoDev == nil, then it checks environment variable once and only once. It's very likely it's disabled all the time, that's why "if logIoDev == &logIoDevNop" is the first line, so that it's just one if condition check most of the cases. if logIoDev == &logIoDevNop { |
It only works when IAVL_DEV is set. I missed this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Added iavl, db & disk stats logging when IAVL_DEV environment variable is set to the device name to check the disk io activity.
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes