Skip to content

Commit

Permalink
This is an automated cherry-pick of #57712
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
hawkingrei authored and ti-chi-bot committed Nov 27, 2024
1 parent 5f4110d commit 4dc1b15
Show file tree
Hide file tree
Showing 3 changed files with 728 additions and 0 deletions.
54 changes: 54 additions & 0 deletions pkg/statistics/handle/syncload/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "syncload",
srcs = ["stats_syncload.go"],
importpath = "github.com/pingcap/tidb/pkg/statistics/handle/syncload",
visibility = ["//visibility:public"],
deps = [
"//pkg/config",
"//pkg/infoschema",
"//pkg/kv",
"//pkg/meta/model",
"//pkg/metrics",
"//pkg/parser/mysql",
"//pkg/sessionctx",
"//pkg/sessionctx/stmtctx",
"//pkg/sessionctx/variable",
"//pkg/statistics",
"//pkg/statistics/handle/storage",
"//pkg/statistics/handle/types",
"//pkg/table",
"//pkg/types",
"//pkg/util",
"//pkg/util/intest",
"//pkg/util/logutil",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@org_golang_x_sync//singleflight",
"@org_uber_go_zap//:zap",
],
)

go_test(
name = "syncload_test",
timeout = "short",
srcs = ["stats_syncload_test.go"],
flaky = True,
race = "on",
shard_count = 7,
deps = [
":syncload",
"//pkg/config",
"//pkg/meta/model",
"//pkg/parser/model",
"//pkg/sessionctx",
"//pkg/sessionctx/stmtctx",
"//pkg/statistics/handle/types",
"//pkg/testkit",
"//pkg/testkit/analyzehelper",
"//pkg/util/mathutil",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_stretchr_testify//require",
],
)
Loading

0 comments on commit 4dc1b15

Please sign in to comment.