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

Templetize user_request::print_help_usage() output #33

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

Templetize user_request::print_help_usage() output #33

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

PrzemekWirkus commented Oct 14, 2024

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

Function user_request::print_help_usage() can be templetised.

We for example use default values for timeline interval (60 seconds) and set magic number like this:

if (count_interval == -1.0)
    count_interval = 60;

In usage:

    -i
        Specify counting interval in seconds, `0` seconds is allowed.

We can:

  1. Declare consts for magic value 60 e.g. const double TIMELINE_INTERVAL_VAL = 60.0 and
  2. Use string replace and replace %INT_VAL% with value of TIMELINE_INTERVAL_VAL :
-i
        Specify counting interval in seconds, `0` seconds is allowed.
        Default %INT_VAL% seconds.
@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