summaryrefslogtreecommitdiffhomepage
path: root/pkg/test/dockerutil/BUILD
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2020-07-26 22:01:16 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-26 22:02:51 -0700
commit2ecf66903ed3da46fa021feeeeccad81cd82eaa6 (patch)
treebcbccbcc031169bb2761549731ebf924466ae909 /pkg/test/dockerutil/BUILD
parentb38bae00885ef1bc97ff2798917e286bc14ca2f0 (diff)
Add profiling to dockerutil
Adds profiling with `runsc debug` or pprof to dockerutil. All targets using dockerutil should now be able to use profiling. In addition, modifies existing benchmarks to use profiling. PiperOrigin-RevId: 323298634
Diffstat (limited to 'pkg/test/dockerutil/BUILD')
-rw-r--r--pkg/test/dockerutil/BUILD19
1 files changed, 18 insertions, 1 deletions
diff --git a/pkg/test/dockerutil/BUILD b/pkg/test/dockerutil/BUILD
index 83b80c8bc..a5e84658a 100644
--- a/pkg/test/dockerutil/BUILD
+++ b/pkg/test/dockerutil/BUILD
@@ -1,4 +1,4 @@
-load("//tools:defs.bzl", "go_library")
+load("//tools:defs.bzl", "go_library", "go_test")
package(licenses = ["notice"])
@@ -10,6 +10,7 @@ go_library(
"dockerutil.go",
"exec.go",
"network.go",
+ "profile.go",
],
visibility = ["//:sandbox"],
deps = [
@@ -23,3 +24,19 @@ go_library(
"@com_github_docker_go_connections//nat:go_default_library",
],
)
+
+go_test(
+ name = "profile_test",
+ size = "large",
+ srcs = [
+ "profile_test.go",
+ ],
+ library = ":dockerutil",
+ tags = [
+ # Requires docker and runsc to be configured before test runs.
+ # Also requires the test to be run as root.
+ "manual",
+ "local",
+ ],
+ visibility = ["//:sandbox"],
+)