87 lines
2.4 KiB
Python
87 lines
2.4 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "telemetry",
|
|
srcs = [
|
|
"data.go",
|
|
"data_cluster_hardware.go",
|
|
"data_cluster_info.go",
|
|
"data_feature_usage.go",
|
|
"data_slow_query.go",
|
|
"data_telemetry_host_extra.go",
|
|
"data_window.go",
|
|
"id.go",
|
|
"status.go",
|
|
"telemetry.go",
|
|
"ttl.go",
|
|
"util.go",
|
|
],
|
|
importpath = "github.com/pingcap/tidb/telemetry",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//br/pkg/utils",
|
|
"//config",
|
|
"//domain/infosync",
|
|
"//infoschema",
|
|
"//kv",
|
|
"//metrics",
|
|
"//parser/ast",
|
|
"//parser/model",
|
|
"//parser/mysql",
|
|
"//sessionctx",
|
|
"//sessionctx/variable",
|
|
"//util/logutil",
|
|
"//util/memory",
|
|
"//util/sqlexec",
|
|
"@com_github_google_uuid//:uuid",
|
|
"@com_github_iancoleman_strcase//:strcase",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_prometheus_client_golang//api",
|
|
"@com_github_prometheus_client_golang//api/prometheus/v1:prometheus",
|
|
"@com_github_prometheus_common//model",
|
|
"@com_github_shirou_gopsutil_v3//cpu",
|
|
"@com_github_shirou_gopsutil_v3//host",
|
|
"@com_github_tikv_client_go_v2//metrics",
|
|
"@io_etcd_go_etcd_client_v3//:client",
|
|
"@org_golang_x_exp//slices",
|
|
"@org_uber_go_atomic//:atomic",
|
|
"@org_uber_go_zap//:zap",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "telemetry_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"data_cluster_hardware_test.go",
|
|
"data_feature_usage_test.go",
|
|
"data_window_test.go",
|
|
"main_test.go",
|
|
"telemetry_test.go",
|
|
"util_test.go",
|
|
],
|
|
embed = [":telemetry"],
|
|
flaky = True,
|
|
deps = [
|
|
"//autoid_service",
|
|
"//config",
|
|
"//ddl",
|
|
"//domain",
|
|
"//kv",
|
|
"//parser/model",
|
|
"//session",
|
|
"//sessionctx",
|
|
"//sessionctx/variable",
|
|
"//store/mockstore",
|
|
"//store/mockstore/unistore",
|
|
"//testkit",
|
|
"//testkit/testsetup",
|
|
"@com_github_jeffail_gabs_v2//:gabs",
|
|
"@com_github_pingcap_kvproto//pkg/metapb",
|
|
"@com_github_stretchr_testify//require",
|
|
"@com_github_tikv_client_go_v2//testutils",
|
|
"@io_etcd_go_etcd_tests_v3//integration",
|
|
"@org_uber_go_goleak//:goleak",
|
|
],
|
|
)
|