diff options
author | Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> | 2018-10-26 14:47:52 +0900 |
---|---|---|
committer | Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> | 2018-12-19 16:05:21 +0900 |
commit | 658f772c16da05807c2c079449e8ac71fd6f55c5 (patch) | |
tree | 77e9bac1bce0b3b57336ceea5787b27ec31905b3 /vendor/github.com/pkg/profile/mutex.go | |
parent | c8eaf59d5f4bec249db8134c6a9fcfbcac792519 (diff) | |
download | podman-658f772c16da05807c2c079449e8ac71fd6f55c5.tar.gz podman-658f772c16da05807c2c079449e8ac71fd6f55c5.tar.bz2 podman-658f772c16da05807c2c079449e8ac71fd6f55c5.zip |
perf test a stress test to profile CPU load of podman
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Diffstat (limited to 'vendor/github.com/pkg/profile/mutex.go')
-rw-r--r-- | vendor/github.com/pkg/profile/mutex.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/pkg/profile/mutex.go b/vendor/github.com/pkg/profile/mutex.go new file mode 100644 index 000000000..e69c5b44d --- /dev/null +++ b/vendor/github.com/pkg/profile/mutex.go @@ -0,0 +1,13 @@ +// +build go1.8 + +package profile + +import "runtime" + +func enableMutexProfile() { + runtime.SetMutexProfileFraction(1) +} + +func disableMutexProfile() { + runtime.SetMutexProfileFraction(0) +} |