27 lines
651 B
Python
27 lines
651 B
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "cpu",
|
|
srcs = ["cpu.go"],
|
|
importpath = "github.com/pingcap/tidb/util/cpu",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//metrics",
|
|
"//util/cgroup",
|
|
"//util/mathutil",
|
|
"@com_github_cloudfoundry_gosigar//:gosigar",
|
|
"@com_github_pingcap_log//:log",
|
|
"@org_uber_go_atomic//:atomic",
|
|
"@org_uber_go_zap//:zap",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "cpu_test",
|
|
srcs = ["cpu_test.go"],
|
|
embed = [":cpu"],
|
|
flaky = True,
|
|
race = "on",
|
|
deps = ["@com_github_stretchr_testify//require"],
|
|
)
|