Fix all open go lint and vet issues
This commit is contained in:
parent
5289ffb270
commit
c703435790
37 changed files with 136 additions and 129 deletions
|
|
@ -46,8 +46,7 @@ func getCanonicalMetricName(filename string) string {
|
|||
}
|
||||
}
|
||||
|
||||
// Takes a prometheus registry and returns a new Collector exposing
|
||||
// kernel/system statistics.
|
||||
// NewKsmdCollector returns a new Collector exposing kernel/system statistics.
|
||||
func NewKsmdCollector() (Collector, error) {
|
||||
subsystem := "ksmd"
|
||||
descs := make(map[string]*prometheus.Desc)
|
||||
|
|
@ -60,7 +59,7 @@ func NewKsmdCollector() (Collector, error) {
|
|||
return &ksmdCollector{descs}, nil
|
||||
}
|
||||
|
||||
// Expose kernel and system statistics.
|
||||
// Update implements Collector and exposes kernel and system statistics.
|
||||
func (c *ksmdCollector) Update(ch chan<- prometheus.Metric) (err error) {
|
||||
for _, n := range ksmdFiles {
|
||||
val, err := readUintFromFile(sysFilePath(path.Join("kernel/mm/ksm", n)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue