diff --git a/README.md b/README.md index 6dd8f9c..ac33a4d 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,8 @@ To use the extension: 4. Start your application in dev mode: `quarkus dev` 5. Enter the dev mode terminal by pressing `:` (column) 6. You should have a new `power` command available, type `power --help` for more information -7. You can start power measurement with `power start` and stop it with `power stop` \ No newline at end of file +7. You can start power measurement with `power start` and stop it with `power stop`, at which time the power consumption + of your app will be displayed. +8. You can also ask for power to be measured for a given duration by using the `--duration` option when + calling `power start`. In this case, there's no need to call `power stop`, the energy consumed during the specified + time will be automatically displayed once the time period is elapsed. \ No newline at end of file diff --git a/deployment/src/main/java/io/quarkiverse/power/deployment/devui/commands/StartCommand.java b/deployment/src/main/java/io/quarkiverse/power/deployment/devui/commands/StartCommand.java index 98de5f2..5a1b448 100644 --- a/deployment/src/main/java/io/quarkiverse/power/deployment/devui/commands/StartCommand.java +++ b/deployment/src/main/java/io/quarkiverse/power/deployment/devui/commands/StartCommand.java @@ -28,7 +28,8 @@ public CommandResult execute(CommandInvocation commandInvocation) { if (duration > 0) { commandInvocation.println("Measuring power for " + duration + " seconds, every " + frequency + " milliseconds"); } else { - commandInvocation.println("Measuring power until 'stop' is called, every " + frequency + " milliseconds"); + commandInvocation.println("Measuring power every " + frequency + + " milliseconds. Execute 'power stop' to stop measurements and get the results."); } sensor.start(duration, frequency, commandInvocation::println); } catch (Exception e) {