-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
90048: workload: add workload to trigger insight scenarios r=j82w a=j82w This is adding a new workload that is designed to run several bad queries that will be detected by the insights. This workload is not public. The list of bad queries: 1. Order by on a non-indexed column 2. Transaction updates multiple rows with a delay 3. Join on a non-indexed column 4. Contention in update by blocking a txn in the app Release note: none closes #90977 Release note: none Co-authored-by: j82w <[email protected]>
- Loading branch information
Showing
9 changed files
with
531 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
load("//build/bazelutil/unused_checker:unused.bzl", "get_x_data") | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") | ||
|
||
go_library( | ||
name = "insights", | ||
srcs = ["insights.go"], | ||
importpath = "github.com/cockroachdb/cockroach/pkg/workload/insights", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/col/coldata", | ||
"//pkg/sql/types", | ||
"//pkg/util/bufalloc", | ||
"//pkg/util/timeutil", | ||
"//pkg/workload", | ||
"//pkg/workload/histogram", | ||
"@com_github_cockroachdb_errors//:errors", | ||
"@com_github_spf13_pflag//:pflag", | ||
"@org_golang_x_exp//rand", | ||
], | ||
) | ||
|
||
go_test( | ||
name = "insights_test", | ||
size = "small", | ||
srcs = [ | ||
"insights_test.go", | ||
"main_test.go", | ||
], | ||
args = ["-test.timeout=55s"], | ||
embed = [":insights"], | ||
deps = [ | ||
"//pkg/base", | ||
"//pkg/security/securityassets", | ||
"//pkg/security/securitytest", | ||
"//pkg/server", | ||
"//pkg/testutils/serverutils", | ||
"//pkg/testutils/sqlutils", | ||
"//pkg/testutils/testcluster", | ||
"//pkg/util/leaktest", | ||
"//pkg/util/randutil", | ||
"//pkg/workload/workloadsql", | ||
], | ||
) | ||
|
||
get_x_data(name = "get_x_data") |
Oops, something went wrong.