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.
are u sure that not
return d.onWorkersMetrics(uuids), nil
?
antmat
left a comment
There was a problem hiding this comment.
Rather big PR - still not fully reviewed.
isolate/initialdispatch.go
Outdated
|
|
||
| sz, err = r.ReadArrayHeader() | ||
| if err != nil { | ||
| return uuids, err |
| return nil, err | ||
| } | ||
|
|
||
| return d.onWorkersMetrics(uuids) |
|
|
||
| startTime := time.Now() | ||
|
|
||
| sendMetricsFunc := func(metrics MetricsResponse) { |
There was a problem hiding this comment.
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.
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.
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: