-
Notifications
You must be signed in to change notification settings - Fork 19
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
Agents #83
Agents #83
Conversation
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
gossip/monitor/monitor.go
Outdated
monitor.executionTicker = time.NewTicker(conf.TaskExecutionInterval) | ||
go monitor.runTaskDispatcher() | ||
|
||
return &monitor, nil | ||
} | ||
|
||
type Task interface { | ||
Do() | ||
func (m Monitor) RegisterMetrics(r *prometheus.Registry) { |
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.
If you're going to change the way we register metrics IMHO, you should change every occurrence of this code, or at least make an Issue, tech debt post-it or whatever to end this task.
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.
It is changed in all processors.
} | ||
|
||
func newSnapStore() *snapStore { | ||
return &snapStore{segments: append([]Segment{}, Segment{})} | ||
return &snapStore{ | ||
data: freecache.NewCache(2 << 30), |
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.
Maybe a small comment of this "magic number"? (why it's 2<<30 at least)
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.
That's a gigabyte of cache. Its not a magic number. Seems good enough for our testing environment. No other particular reason.
…tes, clean up design, implement out queue as a timedout channel, simplify stop code
…esides in the agent code and not in the processor
…cessors get their cusrtom metrics registered into the agent server
… stop, start and register metrics
…on as they are enqueued
…PI. Sender and qed server share the same metrics server.
Agents, metrics and some tests refactor Former-commit-id: daa0759
Clean up agents before its transformation.