Skip to content

Commit

Permalink
docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
nenadnoveljic committed Nov 22, 2023
1 parent dfdefb3 commit bf829b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/collector/corechecks/oracle-dbm/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (c *Check) Run() error {

if c.config.SysMetrics.Enabled {
log.Debugf("%s Entered sysmetrics", c.logPrompt)
_, err := c.SysMetrics()
_, err := c.sysMetrics()
if err != nil {
return fmt.Errorf("%s failed to collect sysmetrics %w", c.logPrompt, err)
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/collector/corechecks/oracle-dbm/sysmetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ func (c *Check) sendMetric(s sender.Sender, r SysmetricsRowDB, seen map[string]b
}
}

func (c *Check) SysMetrics() (int64, error) {
// sysMetrics emits sysmetrics metrics
// It returns the number of metrics emitted and any errors encountered.
func (c *Check) sysMetrics() (int64, error) {
var n int64
sender, err := c.GetSender()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/collector/corechecks/oracle-dbm/sysmetrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func TestSysmetrics(t *testing.T) {
n, err := chk.SysMetrics()
n, err := chk.sysMetrics()
assert.NoError(t, err, "failed to run sys metrics")
assert.Equal(t, int64(92), n)
}

0 comments on commit bf829b8

Please sign in to comment.