Skip to content

Conversation

@AlekSi
Copy link

@AlekSi AlekSi commented Dec 10, 2019

  • node_memory_XXX => node_memory_XXX_bytes
  • node_disk_XXX => node_disk_XXX_bytes
  • node_filesystem_XXX => node_filesystem_XXX_bytes

@AlekSi AlekSi self-assigned this Dec 10, 2019
},
},
})
// TODO

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sessions/sessions_test.go:57: Line contains TODO/BUG/FIXME: "TODO" (from godox)

)

//nolint:lll
func readJSON(t *testing.T, file string) []byte {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

func readJSON is unused (from unused)

return bytes.TrimSpace(b)
}

func readMetrics(t *testing.T, file string) []string {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

func readMetrics is unused (from unused)


b, err := ioutil.ReadFile(filepath.Join("testdata", file)) //nolint:gosec
require.NoError(t, err)
return bytes.TrimSpace(b)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return statements should not be cuddled if block has more than two lines (from wsl)


b, err := ioutil.ReadFile(filepath.Join("testdata", file)) //nolint:gosec
require.NoError(t, err)
return strings.Split(string(bytes.TrimSpace(b)), "\n")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return statements should not be cuddled if block has more than two lines (from wsl)

}
if s.WriteKb != nil {
desc := prometheus.NewDesc("node_disk_bytes_written", "The total number of bytes written successfully.", labelKeys, constLabels)
desc := prometheus.NewDesc("node_disk_written_bytes_total", "The total number of bytes written successfully.", labelKeys, constLabels)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line is 142 characters (from lll)

desc = prometheus.NewDesc("node_filesystem_free_bytes", "Filesystem free space in bytes.", labelKeys, constLabels)
res = append(res, prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, float64((s.Total-s.Used)*1024), labelValues...))
desc = prometheus.NewDesc("node_filesystem_avail", "Filesystem space available to non-root users in bytes.", labelKeys, constLabels)
desc = prometheus.NewDesc("node_filesystem_avail_bytes", "Filesystem space available to non-root users in bytes.", labelKeys, constLabels)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line is 142 characters (from lll)

)

//nolint:lll
var golden = flag.Bool("golden", false, "update golden files")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golden is a global variable (from gochecknoglobals)

@AlekSi AlekSi marked this pull request as ready for review December 11, 2019 12:00
@AlekSi AlekSi requested a review from BupycHuk December 11, 2019 12:00
@AlekSi AlekSi changed the title PMM-5058 Update node_memory_XXX metrics. PMM-5058 Update node_exporter-like metrics. Dec 11, 2019
@AlekSi AlekSi merged commit 03bab8a into master Dec 11, 2019
@AlekSi AlekSi deleted the PMM-5085-fix-metrics branch December 11, 2019 12:24
@BupycHuk BupycHuk mentioned this pull request Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants