Procstat: don't cache PIDs (#2206)

* Procstat: don't cache PIDs

Changed the procstat input plugin to not cache PIDs. Solves #1636.
The logic of creating a process by pid was moved from `procstat.go` to
`spec_processor.go`.

* Procstat: go fmt

* procstat: modify changelog for #2206
This commit is contained in:
Yaron de Leeuw
2017-02-02 09:12:22 -05:00
committed by Cameron Sparr
parent 036d1beb87
commit 2a32cba35b
4 changed files with 40 additions and 61 deletions

View File

@@ -6,7 +6,6 @@ import (
"strconv"
"testing"
"github.com/shirou/gopsutil/process"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -24,7 +23,6 @@ func TestGather(t *testing.T) {
p := Procstat{
PidFile: file.Name(),
Prefix: "foo",
pidmap: make(map[int32]*process.Process),
tagmap: make(map[int32]map[string]string),
}
p.Gather(&acc)