Skip to content

Commit

Permalink
backend: Modify cpu_vendor
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
  • Loading branch information
lexnv committed Nov 3, 2023
1 parent d183027 commit 124a95d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions backend/telemetry_core/src/state/chain_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ fn test_kernel_version_number() {
}

fn cpu_vendor(cpu: &Box<str>) -> &str {
if cpu.eq_ignore_ascii_case("Intel") {
let lowercase_cpu = cpu.to_ascii_lowercase();

if lowercase_cpu.contains("intel") {
"Intel"
} else if cpu.eq_ignore_ascii_case("AMD") {
} else if lowercase_cpu.contains("amd") {
"AMD"
} else if cpu.eq_ignore_ascii_case("ARM") {
} else if lowercase_cpu.contains("arm") {
"ARM"
} else if cpu.eq_ignore_ascii_case("Apple") {
} else if lowercase_cpu.contains("apple") {
"Apple"
} else {
"Other"
Expand Down

0 comments on commit 124a95d

Please sign in to comment.