You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* profilecreator: dissolve helpers into subpackages
reorganize the current helper.go dissolving it into
specific subpackages. The goal is tstreamline the
code layout without changes in behavior.
Signed-off-by: Francesco Romani <[email protected]>
* profilecreator: simplify package layout
the `cmd/pkg` layout is awkward. Canonically:
- code used only by a tool should sit in `internal/`
- code which is/can be exported should sit in `pkg`.
However, in case of nontrivial command line utilities,
it's a widespread practice to have `pkg/cmd` (or `pkg/commands`) trees.
This enable third party utilities to easily embed other utilities
maximizing code reuse.
We streamline the code layout with trivial code
movements - no intended changes of behavior.
The net result is now `cmd/performance-profile-creator` is now
minified, and holds only the entry point source code file.
Signed-off-by: Francesco Romani <[email protected]>
* profilecreator: chore: refactor profilecreator.go
extract code which deals with mustgather or ghw in their
own source files. Trivial code movement with no changes in behavior.
Signed-off-by: Francesco Romani <[email protected]>
* profilecreator: improvements in the `info` command
- add pure text output command. By default (and it's very hard to
change, if we ever should) log messages go on stderr. We want the
output on stdout. Added flag `--text` to enable it
- internal cleanup and code reorganization. In log mode, log all the
message in one go, which is easier to manage.
No intended change in behavior.
Signed-off-by: Francesco Romani <[email protected]>
* profilecreator: add and use Alert function
We used the `logrus` package internally, but minimally
and pretty much only to notify processing status to the user.
This code was thus the only remaining consumer of that package,
which we don't really need.
Add a neutral (nor log, nor warning) minimal abstraction `Alert`,
similar in spirit to `ghw`, to be used when we need to notify the
user about processing status.
Make the backend easy to replace to make integration of this code
easier. We don't see this happening, but the extra cost is negligible.
Remove the direct dependency to `logrus`.
Note we still have quite many indirect dependencies pulling it in.
Signed-off-by: Francesco Romani <[email protected]>
---------
Signed-off-by: Francesco Romani <[email protected]>
0 commit comments