Add native Go method for finding pids to procstat (#3559)

This commit is contained in:
Ben Aldrich
2018-02-01 16:14:27 -07:00
committed by Daniel Nelson
parent 9b4177d46c
commit 551c771bba
10 changed files with 301 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"testing"
"time"
@@ -349,6 +350,10 @@ func TestGather_systemdUnitPIDs(t *testing.T) {
}
func TestGather_cgroupPIDs(t *testing.T) {
//no cgroups in windows
if runtime.GOOS == "windows" {
t.Skip("no cgroups in windows")
}
td, err := ioutil.TempDir("", "")
require.NoError(t, err)
defer os.RemoveAll(td)