-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Implement server stats and self-monitoring #1936
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
7d82beb
Add basic stats type
otoolep 8825580
Track server stats
otoolep 228e238
Remove unnecessary err variable
otoolep e080664
Add "SHOW STATS" command
otoolep f730257
Implement self-monitoring
otoolep 240b7a7
Add convenient Inc() method to Stats
otoolep 6867d80
Use Inc() shorthand for Stats
otoolep bf28720
Add "name" to stats object
otoolep 95f7a00
Fix test config for _internal database
otoolep f6ae0f9
Fix up statistics 'check-interval' in sample config
otoolep a8b928a
Add explanatory comments re statistics config
otoolep d95c945
Better names for statistics config options
otoolep a0e57a8
Allow stats to be snapshot
otoolep 5240151
Actually start self-monitoring if requested
otoolep 511be11
Final tweaks to stats unit tests
otoolep ea7b7be
Fix 'go vet' errors
otoolep ae3b3d5
Rename "metrics" to "stats"
otoolep f4b3e3d
Fix final 'go vet' errors
otoolep a99cd37
Update CHANGELOG
otoolep 5aa49ef
Add GoDoc comments to Stats type
otoolep d627634
Ensure internal retention policy exists
otoolep 43161bb
Small chance that a database exists
otoolep 032cfaa
Launch self-monitoring in a go-routine
otoolep 50d2470
Write totals, not diff, of internal stats
otoolep eec2cf6
Use a better ID for the server ID in stats
otoolep 69530b7
Use a time.Ticker object for precise self-monitoring
otoolep 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
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.
Missing an
interval := config.Statistics.WriteInterval
?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.
Very good -- I just fixed that on my local copy and see you spotted it. Fix coming.