-
Notifications
You must be signed in to change notification settings - Fork 225
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
feat: add metrics publisher for NT #1791
base: main
Are you sure you want to change the base?
feat: add metrics publisher for NT #1791
Conversation
Also add a way to toggle this in settings. |
Nah. Keep it on. IMO this kind of participant metrics could be good to have as a NT protocol extnesion |
@@ -129,6 +129,24 @@ public String getIpAddress() { | |||
return addr; | |||
} | |||
|
|||
public HashMap<String, String> getMetrics() { | |||
HashMap<String, String> metrics = new HashMap<String, String>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What drove you to use a HashMap here? It looks like this code is duplicated from publishMetrics. Can we switch both to a Jackson serializable Java POD class? And we might consider a NT struct here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just used a hashmap cause we use it in the publishMetrics as well. When you say NT struct, do you mean like a subtable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think a hashmap might be the best option as it lets us easily iterate through everything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a struct is the best option for publishing to NT then a shared type between photonlib and the backend for accessing the data
this might work, but it still needs testing.
we don't know if it actually publishes, also don't know how much resources this'll consume