-
Notifications
You must be signed in to change notification settings - Fork 259
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
move metrics usage out of program-runtime #3390
move metrics usage out of program-runtime #3390
Conversation
The Firedancer team maintains a line-for-line reimplementation of the |
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 don't think this is the best way to go about removing the metrics dependency from the program-runtime.
This adds unnecessary indirection to the program cache API, calling into free functions in some other crate. Additionally, the intention here is to make a program-runtime metrics crate, but that's not what the crate proposed here does. It has a lot of the same dependencies as the program-runtime and shares ELF-loading responsibilities with the main program-runtime crate. Metrics are still a side job.
I wonder if we can just put the metrics struct, the datapoint submissions, and the argument for &mut LoadProgramMetrics
behind a metrics
feature flag. This way, LiteSVM can just use program-runtime without the metrics
feature.
Something like this? #3477 |
Yes. Does that approach solve your problem in LiteSVM? |
Not without #3383 |
Closing in favour of #3477 |
Problem
solana-program-runtime has an annoying solana-metrics dependency that severely impacts build time and dependency hell. It's particularly annoying for litesvm which depends on solana-program-runtime
Summary of Changes
None of these API changes affect crates that are covered by the backwards compatibility policy. I don't think deprecation is the way to go here as it would require waiting a long time to actually remove the dependencies