Skip to content

Commit

Permalink
feat: add read bandwidth and write bandwidth for disk
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Nov 18, 2024
1 parent 12368e3 commit 8ef0d31
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.0.170"
version = "2.0.171"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
27 changes: 25 additions & 2 deletions pkg/apis/common/v2/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/apis/common/v2/common.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/apis/common/v2/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ message Disk {
uint64 inodes_free = 7;
// Used percent of indoes on the data path of dragonfly directory.
double inodes_used_percent = 8 [(validate.rules).double = {gte: 0, lte: 100}];
// Disk read bandwidth, in bytes per second.
uint64 read_bandwidth = 9;
// Disk write bandwidth, in bytes per second.
uint64 write_bandwidth = 10;
}

// Build information.
Expand Down
4 changes: 4 additions & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ message Disk {
uint64 inodes_free = 7;
// Used percent of indoes on the data path of dragonfly directory.
double inodes_used_percent = 8;
// Disk read bandwidth, in bytes per second.
uint64 read_bandwidth = 9;
// Disk write bandwidth, in bytes per second.
uint64 write_bandwidth = 10;
}

// Build information.
Expand Down
6 changes: 6 additions & 0 deletions src/common.v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,12 @@ pub struct Disk {
/// Used percent of indoes on the data path of dragonfly directory.
#[prost(double, tag = "8")]
pub inodes_used_percent: f64,
/// Disk read bandwidth, in bytes per second.
#[prost(uint64, tag = "9")]
pub read_bandwidth: u64,
/// Disk write bandwidth, in bytes per second.
#[prost(uint64, tag = "10")]
pub write_bandwidth: u64,
}
/// Build information.
#[derive(serde::Serialize, serde::Deserialize)]
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.

0 comments on commit 8ef0d31

Please sign in to comment.