Make dietpi-benchmark a standalone shell command with TUI menu#7982
Make dietpi-benchmark a standalone shell command with TUI menu#7982
Conversation
Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
|
@copilot
|
…r main loop Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
Done in a24a343. Here's what was changed:
|
…chmark default case, remove G_INTERACTIVE check and input 0 Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
There was a problem hiding this comment.
@copilot
See my new comments. And then, now that the script has a proper TUI, move it one directory up to dietpi/dietpi-benchmark. Assure that all calls in our code use /boot/dietpi/dietpi-benchmark accordingly.
Then add a shell alias to https://github.com/MichaIng/DietPi/blob/dev/rootfs/etc/bashrc.d/dietpi.bash
Finally create a changelog entry that the dietpi-benchmark script has been made better accessible as standalone shell command. It does not need to contain all the other changes this PR did, as this is mostly internal restructure, not exposing new features or visible enhancements for users. For them, the only major difference is that they do not need to browse through dietpi-config anymore, but can call the benchmark menu or a particular submenu directly from the console without full script path.
… fix temp display, add changelog Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
Done in 53b54e3:
|
MichaIng
left a comment
There was a problem hiding this comment.
@copilot
See my new comment. Also, please remove the old dietpi/func/dietpi-benchmark entirely. No need to keep the wrapper to preserve the old path.
What I forgot: In https://github.com/MichaIng/DietPi/blob/dev/.update/patches, add a removal of the old script location to Patch_10_2():
G_DIETPI-NOTIFY 2 'Removing old dietpi-benchmark script: It lives now at /boot/dietpi/dietpi-benchmark and is accessible via "dietpi-benchmark" console command.'
G_EXEC rm -f /boot/dietpi/func/dietpi-benchmark…og entry Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
Done in 5932a4c:
|
33d2f53 to
07c8a21
Compare
dietpi-benchmarkhad CLI-only usage while its whiptail menu lived indietpi-configasMenu_FilesystemBenchmark(TARGETMENUID=12). The script has been restructured and promoted to a first-class standalone command, following the same pattern asdietpi-displayanddietpi-ddns.dietpi/dietpi-benchmark(moved fromdietpi/func/dietpi-benchmark)/boot/dietpi/dietpi-benchmarkso it sits alongside other top-level DietPi tools; the old path is cleaned up via an update patchreadonly USAGEvariable documents available commands (matchingdietpi-ddnsstyle); invalid CLI input prints this usage textMain_Menu()loop with three entries:Full Benchmark,Custom Filesystem, andNetwork LANMenu_Full_Benchmark,Menu_Custom_Filesystem,Menu_Network_Lan) that handles allG_WHIP_*input/confirmation/result dialogs for that typeCPU_Benchmark,Filesystem_Benchmark,Benchmark_Survey,Benchmark_Lan_Client) are pure non-interactive functionsRun_Benchmark(type)function wraps execution: sets highest CPU/I/O priority, stops services, calls the benchmark, restarts services, saves results, and uploads to the surveyLoad_Resultsis called once at the very start of the script regardless of CLI argumentMenu_*functions are called from bothMain_Menu(interactive mode) and the CLI main loop (inputs1–4)1–4remain backward-compatible; the former init-only mode0has been removed as it is no longer neededrootfs/etc/bashrc.d/dietpi.bashdietpi-benchmarkadded, so the tool can be invoked directly from the console without a full pathdietpi/dietpi-configMenu_FilesystemBenchmark()and its TARGETMENUID=12 case removedMenu_Toolsnow calls/boot/dietpi/dietpi-benchmarkdirectly (no args).update/patchesPatch_10_2()removes the old/boot/dietpi/func/dietpi-benchmarkscript location on updateCHANGELOG.txt🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.