-
Notifications
You must be signed in to change notification settings - Fork 1k
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
PoC Couch Stats Resource Tracker for tracking process local resource usage #4812
Draft
chewbranca
wants to merge
29
commits into
main
Choose a base branch
from
couch-stats-resource-tracker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 19 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
be84279
PoC couch_stats local resource usage tracking
chewbranca e5e4820
Instrument more stats and rudimentary delta accumulation
chewbranca ecda8f3
Add more usage tracking and core functionality
chewbranca 73863a7
Embed worker usage deltas in rexi:ping
chewbranca 12e0267
WIP: core delta aggregation working
chewbranca 84be4af
TMP: rewire rexi to fail on unexpected messages
chewbranca 19224af
Add baseline group by and sort by aggregations
chewbranca cafa512
Add watchdog scanning for unmonitored processes
chewbranca 996c385
Set dbname context properly
chewbranca 1bbf7a9
Add unsafe_foldl for perf testing
chewbranca e70ba4d
Rework csrt context setting
chewbranca 715b524
WIP: ugly but working HTTP API around groupings
chewbranca be8ab04
Cleanup debug info
chewbranca 4c05a0f
Make CSRT toggle-able and rework delta sending
chewbranca eb20b5d
Remove debug exit clause
chewbranca f4a712c
Declare missing metrics
chewbranca c758cb7
WIP: relax record constraints...
chewbranca 4f00910
Use Default in config:get/3 on ets table error
chewbranca 887a7f2
Switch to delta extraction from messages
chewbranca 1a1a584
Revert "Use Default in config:get/3 on ets table error"
chewbranca db1f874
Flush chttpd_db monitor refs on demonitor
chewbranca 50495bf
TMP Hack around issue #4909
chewbranca 9578773
Avoid mem3_rpc:rexi_call selective receive
chewbranca f77583a
Pass tests and toggle csrt
chewbranca ac17510
Handle delta in fabric rpc tests
chewbranca c500f0f
Conditionally log reports
chewbranca d7e9bd9
Do not persist doc size test config settings
chewbranca f68005a
Configurable logging and no more io_lib:format
chewbranca 0371589
Limit resource usage output and fix keys
chewbranca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -297,6 +297,7 @@ open_doc(Db, IdOrDocInfo) -> | |
open_doc(Db, IdOrDocInfo, []). | ||
|
||
open_doc(Db, Id, Options) -> | ||
%% TODO: wire in csrt tracking | ||
increment_stat(Db, [couchdb, database_reads]), | ||
case open_doc_int(Db, Id, Options) of | ||
{ok, #doc{deleted = true} = Doc} -> | ||
|
@@ -1982,6 +1983,7 @@ increment_stat(#db{options = Options}, Stat, Count) when | |
-> | ||
case lists:member(sys_db, Options) of | ||
true -> | ||
%% TODO: we shouldn't leak resource usage just because it's a sys_db | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hrmm. How we can do it? Are you planing to store Final solution to this question is out of scope for the first PR. TODO is good enough for first version of the feature. |
||
ok; | ||
false -> | ||
couch_stats:increment_counter(Stat, Count) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Here is fine IMO