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

Add hub stats #19

Merged
merged 11 commits into from
Sep 16, 2024
Merged

Conversation

joaoantoniocardoso
Copy link
Member

@joaoantoniocardoso joaoantoniocardoso commented Sep 10, 2024

This PR uses the same metrics from drivers for the hub.

@@ -47,6 +49,23 @@ impl StatsActor {
}
});

let hub_stats_task = tokio::spawn({
let hub = self.hub.clone();
let update_period = Arc::clone(&self.update_period);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason for not calling clone directly ?

Copy link
Member Author

@joaoantoniocardoso joaoantoniocardoso Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no difference, that's a more expressive way of saying you are cloning the ARC, not the data, but we can use .clone, no worries!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... or just let's use it 😆

image

@patrickelectric patrickelectric merged commit 2826d65 into bluerobotics:master Sep 16, 2024
8 checks passed
@joaoantoniocardoso joaoantoniocardoso deleted the add_stats branch September 16, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants