-
Notifications
You must be signed in to change notification settings - Fork 9
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
Basic workers stats #148
base: master
Are you sure you want to change the base?
Basic workers stats #148
Conversation
+ show uuids metrics query in debug log
- (porto) cpu load calculation - remove redundant slice make - rename container metrics -> worker metrics - rename gatherLoop -> gatherMetricsEvery
return nil, err | ||
} | ||
|
||
return d.onWorkersMetrics(uuids) |
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.
are u sure that not
return d.onWorkersMetrics(uuids), nil
?
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.
I bet he's sure)
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.
Rather big PR - still not fully reviewed.
isolate/initialdispatch.go
Outdated
|
||
sz, err = r.ReadArrayHeader() | ||
if err != nil { | ||
return uuids, err |
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.
just return?
return nil, err | ||
} | ||
|
||
return d.onWorkersMetrics(uuids) |
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.
I bet he's sure)
|
||
startTime := time.Now() | ||
|
||
sendMetricsFunc := func(metrics MetricsResponse) { |
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 better to make as a standalone function or method?
isolate/initialdispatch.go
Outdated
) | ||
|
||
if d == nil { | ||
log.G(d.ctx).Error("strange: dispatch is `nil`") |
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.
can it happen? If no - maybe remove, so we can get a crash when logic is being somehow violated?
isolate/porto/metrics_gatherer.go
Outdated
select { | ||
case <- ctx.Done(): | ||
return | ||
case <-time.After(interval): |
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 it' better to use time.Ticker it should spawn less goroutines
4a493a3
to
e19d3a7
Compare
e19d3a7
to
7632da4
Compare
Codecov Report
@@ Coverage Diff @@
## master #148 +/- ##
==========================================
- Coverage 35.98% 28.93% -7.05%
==========================================
Files 41 45 +4
Lines 3185 3981 +796
==========================================
+ Hits 1146 1152 +6
- Misses 1758 2548 +790
Partials 281 281
Continue to review full report at Codecov.
|
c545557
to
e9a0441
Compare
For preliminary review.
Gopher gurus, @3Hren, @antmat, PTAL.
Metrics (for porto and procfs):
Setup (via config file)
Zero poll period (default) switches metrics poll off.
TODO: