mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-11 02:59:34 -06:00
You can run these yourself using the -perf flag, e.g. > noms serve & > go test -v -perf http://localhost:8000 ./samples/go/csv/csv-import > noms ds http://localhost:8000 Though you'll need to go-get github.com/attic-labs/testdata. Note that all of this only records test results, it doesn't have any concept of failing perf (unless test assertsions themselves fail). It will be the job of some other Noms client (work in progress) to do that. I will be setting this up to run continuously momentarily.
48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
// +build !linux
|
|
|
|
package docker
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/shirou/gopsutil/cpu"
|
|
"github.com/shirou/gopsutil/internal/common"
|
|
)
|
|
|
|
// GetDockerStat returns a list of Docker basic stats.
|
|
// This requires certain permission.
|
|
func GetDockerStat() ([]CgroupDockerStat, error) {
|
|
return nil, ErrDockerNotAvailable
|
|
}
|
|
|
|
// GetDockerIDList returnes a list of DockerID.
|
|
// This requires certain permission.
|
|
func GetDockerIDList() ([]string, error) {
|
|
return nil, ErrDockerNotAvailable
|
|
}
|
|
|
|
// CgroupCPU returnes specified cgroup id CPU status.
|
|
// containerid is same as docker id if you use docker.
|
|
// If you use container via systemd.slice, you could use
|
|
// containerid = docker-<container id>.scope and base=/sys/fs/cgroup/cpuacct/system.slice/
|
|
func CgroupCPU(containerid string, base string) (*cpu.TimesStat, error) {
|
|
return nil, ErrCgroupNotAvailable
|
|
}
|
|
|
|
func CgroupCPUDocker(containerid string) (*cpu.TimesStat, error) {
|
|
return CgroupCPU(containerid, common.HostSys("fs/cgroup/cpuacct/docker"))
|
|
}
|
|
|
|
func CgroupMem(containerid string, base string) (*CgroupMemStat, error) {
|
|
return nil, ErrCgroupNotAvailable
|
|
}
|
|
|
|
func CgroupMemDocker(containerid string) (*CgroupMemStat, error) {
|
|
return CgroupMem(containerid, common.HostSys("fs/cgroup/memory/docker"))
|
|
}
|
|
|
|
func (m CgroupMemStat) String() string {
|
|
s, _ := json.Marshal(m)
|
|
return string(s)
|
|
}
|