gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/metric/BUILD (about) 1 load("//tools:defs.bzl", "go_library", "go_test", "proto_library") 2 3 package( 4 default_applicable_licenses = ["//:license"], 5 licenses = ["notice"], 6 ) 7 8 go_library( 9 name = "metric", 10 srcs = [ 11 "condmetric.go", 12 "metric.go", 13 "metric_unsafe.go", 14 "profiling_metric.go", 15 "sentry_profiling.go", 16 "sentry_profiling_fake.go", 17 ], 18 stateify = False, 19 visibility = ["//:sandbox"], 20 deps = [ 21 ":metric_go_proto", 22 "//pkg/atomicbitops", 23 "//pkg/eventchannel", 24 "//pkg/gohacks", 25 "//pkg/log", 26 "//pkg/prometheus", 27 "//pkg/sync", 28 "@org_golang_google_protobuf//encoding/protojson:go_default_library", 29 "@org_golang_google_protobuf//types/known/timestamppb", 30 ], 31 ) 32 33 proto_library( 34 name = "metric", 35 srcs = ["metric.proto"], 36 visibility = ["//:sandbox"], 37 deps = [ 38 "@com_google_protobuf//:timestamp_proto", 39 ], 40 ) 41 42 go_test( 43 name = "metric_test", 44 srcs = [ 45 "metric_test.go", 46 "utils_test.go", 47 ], 48 library = ":metric", 49 tags = ["not_run:arm"], 50 deps = [ 51 ":metric_go_proto", 52 "//pkg/eventchannel", 53 "//pkg/prometheus", 54 "//pkg/sync", 55 "@com_github_prometheus_common//expfmt", 56 "@org_golang_google_protobuf//proto:go_default_library", 57 ], 58 ) 59 60 go_test( 61 name = "condmetric_test", 62 srcs = [ 63 "condmetric_profiling_disabled_test.go", 64 "condmetric_profiling_enabled_test.go", 65 "utils_test.go", 66 ], 67 library = ":metric", 68 deps = [ 69 ":metric_go_proto", 70 "//pkg/eventchannel", 71 "@org_golang_google_protobuf//proto:go_default_library", 72 ], 73 )