Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: correct gibibyte spelling #508

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion metrics-observer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ fn f64_data_to_displayable(value: f64, unit: Unit) -> String {
let offset = match unit {
Unit::Kibibytes => 1,
Unit::Mebibytes => 2,
Unit::Gigibytes => 3,
Unit::Gibibytes => 3,
Unit::Tebibytes => 4,
_ => 0,
};
Expand Down
18 changes: 9 additions & 9 deletions metrics/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ pub enum Unit {
Nanoseconds,
/// Tebibytes.
///
/// One tebibyte is equal to 1024 gigibytes.
/// One tebibyte is equal to 1024 gibibytes.
Tebibytes,
/// Gigibytes.
/// Gibibytes.
///
/// One gigibyte is equal to 1024 mebibytes.
Gigibytes,
/// One gibibyte is equal to 1024 mebibytes.
Gibibytes,
/// Mebibytes.
///
/// One mebibyte is equal to 1024 kibibytes.
Expand Down Expand Up @@ -133,7 +133,7 @@ impl Unit {
Unit::Microseconds => "microseconds",
Unit::Nanoseconds => "nanoseconds",
Unit::Tebibytes => "tebibytes",
Unit::Gigibytes => "gigibytes",
Unit::Gibibytes => "gibibytes",
Unit::Mebibytes => "mebibytes",
Unit::Kibibytes => "kibibytes",
Unit::Bytes => "bytes",
Expand Down Expand Up @@ -161,7 +161,7 @@ impl Unit {
Unit::Microseconds => "μs",
Unit::Nanoseconds => "ns",
Unit::Tebibytes => "TiB",
Unit::Gigibytes => "GiB",
Unit::Gibibytes => "GiB",
Unit::Mebibytes => "MiB",
Unit::Kibibytes => "KiB",
Unit::Bytes => "B",
Expand All @@ -186,7 +186,7 @@ impl Unit {
"microseconds" => Some(Unit::Microseconds),
"nanoseconds" => Some(Unit::Nanoseconds),
"tebibytes" => Some(Unit::Tebibytes),
"gigibytes" => Some(Unit::Gigibytes),
"gibibytes" => Some(Unit::Gibibytes),
"mebibytes" => Some(Unit::Mebibytes),
"kibibytes" => Some(Unit::Kibibytes),
"bytes" => Some(Unit::Bytes),
Expand All @@ -210,7 +210,7 @@ impl Unit {
matches!(
self,
Unit::Tebibytes
| Unit::Gigibytes
| Unit::Gibibytes
| Unit::Mebibytes
| Unit::Kibibytes
| Unit::Bytes
Expand Down Expand Up @@ -294,7 +294,7 @@ mod tests {
Unit::Microseconds,
Unit::Nanoseconds,
Unit::Tebibytes,
Unit::Gigibytes,
Unit::Gibibytes,
Unit::Mebibytes,
Unit::Kibibytes,
Unit::Bytes,
Expand Down
Loading