Skip to content

Commit

Permalink
Format with goimports -local
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Jan 5, 2024
1 parent 9261d75 commit a295025
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/kernel/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strconv"

"github.com/prometheus/procfs"

"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/inputs"
)
Expand Down
3 changes: 2 additions & 1 deletion plugins/inputs/kernel/psi.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"fmt"
"time"

"github.com/influxdata/telegraf"
"github.com/prometheus/procfs"

"github.com/influxdata/telegraf"
)

// Gather PSI metrics
Expand Down
28 changes: 16 additions & 12 deletions plugins/inputs/kernel/psi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ package kernel

import (
"testing"
"time"

"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/require"

"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/metric"
"github.com/influxdata/telegraf/testutil"
)

func TestPSIEnabledWrongDir(t *testing.T) {
Expand Down Expand Up @@ -40,7 +44,7 @@ func TestPSIStats(t *testing.T) {
"avg60": float64(60),
"avg300": float64(300),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Gauge,
),
metric.New(
Expand All @@ -52,7 +56,7 @@ func TestPSIStats(t *testing.T) {
map[string]interface{}{
"total": uint64(114514),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Counter,
),
metric.New(
Expand All @@ -66,7 +70,7 @@ func TestPSIStats(t *testing.T) {
"avg60": float64(60),
"avg300": float64(300),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Gauge,
),
metric.New(
Expand All @@ -78,7 +82,7 @@ func TestPSIStats(t *testing.T) {
map[string]interface{}{
"total": uint64(114514),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Counter,
),
metric.New(
Expand All @@ -92,7 +96,7 @@ func TestPSIStats(t *testing.T) {
"avg60": float64(60),
"avg300": float64(300),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Gauge,
),
metric.New(
Expand All @@ -104,7 +108,7 @@ func TestPSIStats(t *testing.T) {
map[string]interface{}{
"total": uint64(114514),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Counter,
),
metric.New(
Expand All @@ -118,7 +122,7 @@ func TestPSIStats(t *testing.T) {
"avg60": float64(6),
"avg300": float64(30),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Gauge,
),
metric.New(
Expand All @@ -130,7 +134,7 @@ func TestPSIStats(t *testing.T) {
map[string]interface{}{
"total": uint64(11451),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Counter,
),
metric.New(
Expand All @@ -144,7 +148,7 @@ func TestPSIStats(t *testing.T) {
"avg60": float64(6),
"avg300": float64(30),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Gauge,
),
metric.New(
Expand All @@ -156,11 +160,11 @@ func TestPSIStats(t *testing.T) {
map[string]interface{}{
"total": uint64(11451),
},
time.Unix(0,0),
time.Unix(0, 0),
telegraf.Counter,
),
}

actual := acc.GetTelegrafMetrics()
testutil.RequireMeticsEqual(t, expected, actual, testutil.IgnoreTime(), testutil.SortMetrics())
}

0 comments on commit a295025

Please sign in to comment.