Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/metrics.rs')
-rw-r--r--xtask/src/metrics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/xtask/src/metrics.rs b/xtask/src/metrics.rs
index 9a7785dd43..21001c28da 100644
--- a/xtask/src/metrics.rs
+++ b/xtask/src/metrics.rs
@@ -6,7 +6,7 @@ use std::{
time::{Instant, SystemTime, UNIX_EPOCH},
};
-use anyhow::{bail, format_err};
+use anyhow::format_err;
use xshell::{cmd, Shell};
use crate::flags::{self, MeasurementType};
@@ -193,7 +193,7 @@ impl Metrics {
impl Host {
fn new(sh: &Shell) -> anyhow::Result<Host> {
if cfg!(not(target_os = "linux")) {
- bail!("can only collect metrics on Linux ");
+ return Ok(Host { os: "unknown".into(), cpu: "unknown".into(), mem: "unknown".into() });
}
let os = read_field(sh, "/etc/os-release", "PRETTY_NAME=")?.trim_matches('"').to_owned();