Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Add dry run for command line #32

Open
PrzemekWirkus opened this issue Oct 14, 2024 · 0 comments
Open

Add dry run for command line #32

PrzemekWirkus opened this issue Oct 14, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@PrzemekWirkus
Copy link
Collaborator

Cloned from: https://linaro.atlassian.net/browse/WPERF-825

We use wperf test to test some of the WindowsPerf internals. But we do not have decent CLI parse + dry run + exit.

Linux perf has:

       --dry-run
           Parse options then exit. --dry-run can be used to detect
           errors in cmdline options.

We can add --dry-run command line option to user_request class to emit after parsing parsed output and exit. This option should support also JSON output support.

Definition of done

  • Add new command line option -dry-run.
  • For user_request command line option parser, if --dry-run is specified, after parsing all CLI options we should output:
    • To stdout (as normal text) all command line options values already parsed.
      • these can be in parsable by Python strings e.g. if used specify -c 0,1,2 (and --json) we can print:
--json            : True
-c                : [0, 1, 2]
  • We can do not have to cover all the command line options first. We can start with few most important ones like: -c, -e, -m, -n, --output, ( --timeout, sleep ) and -i, bool flags like --json, -t and -q.
  • Add JSON output support - please note that you should use PrettyTable to do the output.
@PrzemekWirkus PrzemekWirkus added enhancement New feature or request good first issue Good for newcomers labels Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant