Skip to content

Commit

Permalink
rac2: add metrics
Browse files Browse the repository at this point in the history
This commit introduces metrics related to stream tokens for both eval
and send. Hooking up these metrics to the registry will be in a
subsequent commit.

Part of: #128031
Fixes: #128913
Release note: None
  • Loading branch information
kvoli committed Aug 26, 2024
1 parent 6ec7bdc commit 4ae6f67
Show file tree
Hide file tree
Showing 7 changed files with 711 additions and 24 deletions.
8 changes: 8 additions & 0 deletions pkg/kv/kvserver/kvflowcontrol/rac2/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 = "rac2",
srcs = [
"metrics.go",
"priority.go",
"range_controller.go",
"store_stream.go",
Expand All @@ -11,23 +12,28 @@ go_library(
importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvflowcontrol/rac2",
visibility = ["//visibility:public"],
deps = [
"//pkg/base",
"//pkg/kv/kvserver/kvflowcontrol",
"//pkg/raft/raftpb",
"//pkg/raft/tracker",
"//pkg/roachpb",
"//pkg/settings/cluster",
"//pkg/util/admission/admissionpb",
"//pkg/util/buildutil",
"//pkg/util/hlc",
"//pkg/util/log",
"//pkg/util/metric",
"//pkg/util/syncutil",
"@com_github_cockroachdb_errors//:errors",
"@com_github_cockroachdb_redact//:redact",
"@com_github_dustin_go_humanize//:go-humanize",
],
)

go_test(
name = "rac2_test",
srcs = [
"metrics_test.go",
"priority_test.go",
"range_controller_test.go",
"token_counter_test.go",
Expand All @@ -41,10 +47,12 @@ go_test(
"//pkg/roachpb",
"//pkg/settings/cluster",
"//pkg/util/admission/admissionpb",
"//pkg/util/hlc",
"//pkg/util/humanizeutil",
"//pkg/util/leaktest",
"//pkg/util/log",
"//pkg/util/syncutil",
"//pkg/util/timeutil",
"@com_github_cockroachdb_datadriven//:datadriven",
"@com_github_dustin_go_humanize//:go-humanize",
"@com_github_stretchr_testify//require",
Expand Down
Loading

0 comments on commit 4ae6f67

Please sign in to comment.