Files
weave-scope/render/detailed/metrics.go
Paul Bellamy 7632e0b3c5 Adding support for plugins, with basic example of iowait, and ebpf
Squash of:
* Include plugins in the report
* show plugin list in the UI
* moving metric and metadata templates into the probe reports
* update js for prime -> priority
* added retry to plugin handshake
* added iowait plugin
* review feedback
* plugin documentation
2016-04-12 17:22:14 +01:00

21 lines
517 B
Go

package detailed
import (
"github.com/weaveworks/scope/report"
)
// NodeMetrics produces a table (to be consumed directly by the UI) based on
// an a report.Node, which is (hopefully) a node in one of our topologies.
func NodeMetrics(r report.Report, n report.Node) []report.MetricRow {
if _, ok := n.Counters.Lookup(n.Topology); ok {
// This is a group of nodes, so no metrics!
return nil
}
topology, ok := r.Topology(n.Topology)
if !ok {
return nil
}
return topology.MetricTemplates.MetricRows(n)
}