Skip to content

Commit

Permalink
support double
Browse files Browse the repository at this point in the history
  • Loading branch information
xudesheng committed Apr 7, 2022
1 parent f09506d commit 6c562e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/jmxquery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ async fn query_jmx_metrics(
query = query.add_field(row.name, value);
}
}
} else if row.type_ == "double" || row.type_ == "java.lang.Double" {
match row.preview.parse::<f64>() {
Err(_) => continue,
Ok(value) => {
query = query.add_field(row.name, value);
}
}
} else {
let value = row.preview.to_string();
query = query.add_field(row.name, value);
Expand Down

0 comments on commit 6c562e5

Please sign in to comment.