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

WIP: dump: added new command #625

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

yarda
Copy link
Contributor

@yarda yarda commented Apr 14, 2024

The dump command dumps active profile. It's good for debugging, because the output is flattened, i.e. it shows the resulting profile after inheritance (profiles merging) is processed.

It keeps naming conventions - for tuned-adm it's named 'dump' action, for API it's named 'dump_profile' method.

The 'priority' value is not output, but output is ordered according to it.

The 'cpuinfo_regex' and 'uname_regex' are not output, but output is rendered according to it.

Variables are not expanded.

@yarda
Copy link
Contributor Author

yarda commented Apr 14, 2024

It's work in progress PoC. I will probably change the API method to use structured output instead of the flat string, also documentation will be updated accordingly.

@jmencak please test and provide feedback.

@yarda
Copy link
Contributor Author

yarda commented Apr 14, 2024

I will probably add the --hide-defaults option for hiding default values that haven't been changed.

@jmencak
Copy link
Contributor

jmencak commented Apr 14, 2024

The dump command dumps active profile. It's good for debugging, because the output is flattened, i.e. it shows the resulting profile after inheritance (profiles merging) is processed.

I like the idea.

Variables are not expanded.

Yeah, I've noticed. I wonder if support for this planned or at least variable definitions will be shown? They are not at the moment of testing.

Is there a Jira card for this so that I could read about the rationale apart from what I read above (useful for debugging)? Thank you!

@yarda
Copy link
Contributor Author

yarda commented Apr 14, 2024

Variables are not expanded.

Yeah, I've noticed. I wonder if support for this planned or at least variable definitions will be shown? They are not at the moment of testing.

This is a good idea, I will add list of variables. It shouldn't be hard. For actual values, it would require extra storage (currently the values aren't stored anywhere and always re-calculated) and refactor of the current code. It's doable, but it depends whether such feature is needed.

Is there a Jira card for this so that I could read about the rationale apart from what I read above (useful for debugging)?

I think there is no Jira card at the moment, but we could create one. I was told by @MarSik few days ago that such feature is urgently needed.

@jmencak
Copy link
Contributor

jmencak commented Apr 14, 2024

I think there is no Jira card at the moment, but we could create one. I was told by @MarSik few days ago that such feature is urgently needed.

Not sure what Martin had in mind, I haven't synced with him about this, but I like the idea of being able to inspect the current configuration.

@yarda
Copy link
Contributor Author

yarda commented Apr 14, 2024

I will also add the [main] prefix to the output, because the output should be reusable as a new TuneD profile.

@yarda yarda changed the title dump: added new command WIP: dump: added new command May 23, 2024
The dump command dumps active profile. It's good for debugging, because
the output is flattened, i.e. it shows the resulting profile after
inheritance (profiles merging) is processed.

It keeps naming conventions - for tuned-adm it's named 'dump' action,
for API it's named 'dump_profile' method.

The 'priority' value is not output, but output is ordered according to
it.

The 'cpuinfo_regex' and 'uname_regex' are not output, but output is
rendered according to it.

Variables are not expanded.

Signed-off-by: Jaroslav Škarvada <[email protected]>
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