Skip to content

Commit

Permalink
statistics: add analysis job factory
Browse files Browse the repository at this point in the history
Signed-off-by: Rustin170506 <[email protected]>

refacor: move to priorityqueue_test

Signed-off-by: Rustin170506 <[email protected]>

refactor: better time window

Signed-off-by: Rustin170506 <[email protected]>

refactor: better parition name and id

Signed-off-by: Rustin170506 <[email protected]>

docs: add comments back

Signed-off-by: Rustin170506 <[email protected]>

docs: add comments back

Signed-off-by: Rustin170506 <[email protected]>

docs: add comments back

Signed-off-by: Rustin170506 <[email protected]>

tests: add more cases

Signed-off-by: Rustin170506 <[email protected]>

refactor: make lint happy

Signed-off-by: Rustin170506 <[email protected]>

docs: mark it is not thread safe

Signed-off-by: Rustin170506 <[email protected]>

refactor: rename

Signed-off-by: Rustin170506 <[email protected]>

fix

Signed-off-by: Rustin170506 <[email protected]>
  • Loading branch information
Rustin170506 committed Sep 14, 2024
1 parent 3688a2b commit f251d0b
Show file tree
Hide file tree
Showing 6 changed files with 905 additions and 865 deletions.
11 changes: 10 additions & 1 deletion pkg/statistics/handle/autoanalyze/priorityqueue/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "priorityqueue",
srcs = [
"analysis_job_factory.go",
"calculator.go",
"dynamic_partitioned_table_analysis_job.go",
"interval.go",
Expand All @@ -14,13 +15,17 @@ go_library(
importpath = "github.com/pingcap/tidb/pkg/statistics/handle/autoanalyze/priorityqueue",
visibility = ["//visibility:public"],
deps = [
"//pkg/meta/model",
"//pkg/sessionctx",
"//pkg/sessionctx/sysproctrack",
"//pkg/sessionctx/variable",
"//pkg/statistics",
"//pkg/statistics/handle/autoanalyze/exec",
"//pkg/statistics/handle/logutil",
"//pkg/statistics/handle/types",
"//pkg/statistics/handle/util",
"//pkg/util/timeutil",
"@com_github_tikv_client_go_v2//oracle",
"@org_uber_go_zap//:zap",
],
)
Expand All @@ -29,6 +34,7 @@ go_test(
name = "priorityqueue_test",
timeout = "short",
srcs = [
"analysis_job_factory_test.go",
"calculator_test.go",
"dynamic_partitioned_table_analysis_job_test.go",
"interval_test.go",
Expand All @@ -39,15 +45,18 @@ go_test(
"static_partitioned_table_analysis_job_test.go",
],
flaky = True,
shard_count = 22,
shard_count = 28,
deps = [
":priorityqueue",
"//pkg/meta/model",
"//pkg/parser/model",
"//pkg/session",
"//pkg/sessionctx",
"//pkg/statistics",
"//pkg/testkit",
"//pkg/testkit/testsetup",
"@com_github_stretchr_testify//require",
"@com_github_tikv_client_go_v2//oracle",
"@org_uber_go_goleak//:goleak",
],
)
Loading

0 comments on commit f251d0b

Please sign in to comment.