Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 63c94eb

Browse files
committed
Gives nameless procs a name isntead of skipping them
1 parent 9ad5b7f commit 63c94eb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/influxdb2.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ byond_fn!(
8686
.as_secs()
8787
.to_string();
8888
for entry in data {
89-
if entry.name.is_empty() {
90-
continue;
89+
let mut name = entry.name
90+
if name.is_empty() {
91+
name = String::from("(no_name)");
9192
}
92-
lines.push(concat_string!("profile,proc=", entry.name, " self=", entry.self_.to_string(), ",total=", entry.total.to_string(), ",real=", entry.real.to_string(), ",over=", entry.over.to_string(), ",calls=", entry.calls.to_string(), ",round_id=", round_id.to_string(), " ", timestamp));
93+
lines.push(concat_string!("profile,proc=", name, " self=", entry.self_.to_string(), ",total=", entry.total.to_string(), ",real=", entry.real.to_string(), ",over=", entry.over.to_string(), ",calls=", entry.calls.to_string(), ",round_id=", round_id.to_string(), " ", timestamp));
9394
}
9495

9596
construct_request(

0 commit comments

Comments
 (0)