forked from Tangruilin/tikv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
statistics: resource metering (tikv#10155)
* init req-cpu Signed-off-by: Zhenchi <[email protected]> * update Signed-off-by: Zhenchi <[email protected]> * tiny improve Signed-off-by: Zhenchi <[email protected]> * add metrics Signed-off-by: Zhenchi <[email protected]> * update configs Signed-off-by: Zhenchi <[email protected]> * Record txn cpu usage Signed-off-by: Zhenchi <[email protected]> * introduce collector trait Signed-off-by: Zhenchi <[email protected]> * fix imprecise recording Signed-off-by: Zhenchi <[email protected]> * global singleton Signed-off-by: Zhenchi <[email protected]> * add tests Signed-off-by: Zhenchi <[email protected]> * integration into server Signed-off-by: Zhenchi <[email protected]> * rename: RequestTag -> ResourceMeteringTag Signed-off-by: Zhenchi <[email protected]> * opt-in Arc Signed-off-by: Zhenchi <[email protected]> * better place to instrument Signed-off-by: Zhenchi <[email protected]> * misc Signed-off-by: Zhenchi <[email protected]> * some movement Signed-off-by: Zhenchi <[email protected]> * add config Signed-off-by: Zhenchi <[email protected]> * implement reporter Signed-off-by: Zhenchi <[email protected]> * remove clone Signed-off-by: Zhenchi <[email protected]> * misc Signed-off-by: Zhenchi <[email protected]> * fix test Signed-off-by: Zhenchi <[email protected]> * tiny refactor Signed-off-by: Zhenchi <[email protected]> * tiny fix Signed-off-by: Zhenchi <[email protected]> * bump grpcio Signed-off-by: Zhenchi <[email protected]> Co-authored-by: Ti Chi Robot <[email protected]>
- Loading branch information
1 parent
acbba9f
commit 1b0841c
Showing
56 changed files
with
1,620 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,44 @@ | ||
[package] | ||
name = "resource_metering" | ||
version = "0.0.1" | ||
edition = "2018" | ||
|
||
[features] | ||
default = ["protobuf-codec"] | ||
protobuf-codec = [ | ||
"kvproto/protobuf-codec", | ||
"grpcio/protobuf-codec", | ||
"security/protobuf-codec", | ||
] | ||
prost-codec = [ | ||
"kvproto/prost-codec", | ||
"grpcio/prost-codec", | ||
"security/prost-codec", | ||
] | ||
|
||
[dependencies] | ||
lazy_static = "1.3" | ||
collections = { path = "../collections" } | ||
libc = "0.2" | ||
crossbeam = "0.8" | ||
pin-project = "1.0" | ||
prometheus = { version = "0.10", features = ["nightly"] } | ||
prometheus-static-metric = "0.4" | ||
kvproto = { rev = "7a046020d1c091638e1e8aba623c8c1e8962219d", git = "https://github.com/pingcap/kvproto.git", default-features = false } | ||
tikv_util = { path = "../tikv_util" } | ||
grpcio = { version = "0.9", default-features = false, features = ["openssl-vendored"] } | ||
security = { path = "../security", default-features = false } | ||
configuration = { path = "../configuration" } | ||
serde = "1.0" | ||
serde_derive = "1.0" | ||
log = { version = "0.4", features = ["max_level_trace", "release_max_level_debug"] } | ||
slog = { version = "2.3", features = ["max_level_trace", "release_max_level_debug"] } | ||
slog-global = { version = "0.1", git = "https://github.com/breeswish/slog-global.git", rev = "d592f88e4dbba5eb439998463054f1a44fbf17b9" } | ||
futures = "0.3" | ||
pdqselect = "0.1" | ||
|
||
[target.'cfg(target_os = "linux")'.dependencies] | ||
procinfo = { git = "https://github.com/tikv/procinfo-rs", rev = "5125fc1a69496b73b26b3c08b6e8afc3c665a56e" } | ||
|
||
[dev-dependencies] | ||
rand = "0.8" |
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,8 @@ | ||
// Copyright 2021 TiKV Project Authors. Licensed under Apache-2.0. | ||
|
||
use crate::cpu::collector::Collector; | ||
|
||
pub struct CollectorHandle; | ||
pub fn register_collector(_collector: Box<dyn Collector>) -> CollectorHandle { | ||
CollectorHandle | ||
} |
Oops, something went wrong.