diff --git a/plugins/inputs/procstat/process.go b/plugins/inputs/procstat/process.go index 7fa053d1c3bc3..afc22d39b2e8e 100644 --- a/plugins/inputs/procstat/process.go +++ b/plugins/inputs/procstat/process.go @@ -4,8 +4,6 @@ import ( "fmt" "time" - "github.com/influxdata/telegraf" - "github.com/influxdata/telegraf/metric" "github.com/shirou/gopsutil/v3/cpu" "github.com/shirou/gopsutil/v3/process" ) @@ -78,17 +76,3 @@ func (p *Proc) Percent(_ time.Duration) (float64, error) { } return cpuPerc, err } - -func (p *Proc) Metric(prefix string, cfg *collectionConfig) telegraf.Metric { - if prefix != "" { - prefix += "_" - } - - fields := make(map[string]interface{}) - - if cfg.features["mmap"] { - collectMemmap(p, prefix, fields) - } - - return metric.New("procstat", p.tags, fields, time.Time{}) -} diff --git a/plugins/inputs/procstat/procstat_test.go b/plugins/inputs/procstat/procstat_test.go index c29f80c924fbf..3aee9ff02456f 100644 --- a/plugins/inputs/procstat/procstat_test.go +++ b/plugins/inputs/procstat/procstat_test.go @@ -13,8 +13,7 @@ import ( "github.com/shirou/gopsutil/v3/cpu" "github.com/shirou/gopsutil/v3/process" "github.com/stretchr/testify/require" - - "github.com/influxdata/telegraf" + "github.com/influxdata/telegraf/testutil" ) @@ -136,9 +135,6 @@ func (p *testProc) MemoryInfo() (*process.MemoryInfoStat, error) { func (p *testProc) MemoryMaps(bool) (*[]process.MemoryMapsStat, error) { return &[]process.MemoryMapsStat{}, nil } -func (p *testProc) Metric(prefix string, cfg *collectionConfig) telegraf.Metric { - return nil -} func (p *testProc) Name() (string, error) { return "test_proc", nil }