76 lines
2.2 KiB
Python
76 lines
2.2 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "optimizor",
|
|
srcs = [
|
|
"optimize_trace.go",
|
|
"plan_replayer.go",
|
|
"statistics_handler.go",
|
|
],
|
|
importpath = "github.com/pingcap/tidb/pkg/server/handler/optimizor",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//pkg/domain",
|
|
"//pkg/domain/infosync",
|
|
"//pkg/infoschema",
|
|
"//pkg/meta/model",
|
|
"//pkg/parser/ast",
|
|
"//pkg/parser/mysql",
|
|
"//pkg/server/handler",
|
|
"//pkg/sessionctx/vardef",
|
|
"//pkg/statistics/handle",
|
|
"//pkg/statistics/util",
|
|
"//pkg/table",
|
|
"//pkg/types",
|
|
"//pkg/util",
|
|
"//pkg/util/logutil",
|
|
"//pkg/util/replayer",
|
|
"@com_github_burntsushi_toml//:toml",
|
|
"@com_github_gorilla_mux//:mux",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_tikv_client_go_v2//oracle",
|
|
"@org_uber_go_zap//:zap",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "optimizor_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"main_test.go",
|
|
"plan_replayer_test.go",
|
|
"statistics_handler_test.go",
|
|
],
|
|
flaky = True,
|
|
shard_count = 9,
|
|
deps = [
|
|
":optimizor",
|
|
"//pkg/config",
|
|
"//pkg/domain",
|
|
"//pkg/kv",
|
|
"//pkg/metrics",
|
|
"//pkg/parser/ast",
|
|
"//pkg/server",
|
|
"//pkg/server/internal/testserverclient",
|
|
"//pkg/server/internal/testutil",
|
|
"//pkg/server/internal/util",
|
|
"//pkg/session",
|
|
"//pkg/statistics/handle/ddl/testutil",
|
|
"//pkg/statistics/handle/types",
|
|
"//pkg/statistics/util",
|
|
"//pkg/store/mockstore/unistore",
|
|
"//pkg/testkit",
|
|
"//pkg/testkit/testsetup",
|
|
"//pkg/util/replayer",
|
|
"//pkg/util/topsql/state",
|
|
"@com_github_burntsushi_toml//:toml",
|
|
"@com_github_go_sql_driver_mysql//:mysql",
|
|
"@com_github_gorilla_mux//:mux",
|
|
"@com_github_pingcap_failpoint//:failpoint",
|
|
"@com_github_stretchr_testify//require",
|
|
"@com_github_tikv_client_go_v2//oracle",
|
|
"@com_github_tikv_client_go_v2//tikv",
|
|
"@org_uber_go_goleak//:goleak",
|
|
],
|
|
)
|