From: John Kacur <jkacur@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Linux RT Users <linux-rt-users@vger.kernel.org>
Subject: Re: [patch 1/2] add -h option to queuelat
Date: Wed, 19 Sep 2018 16:39:28 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.21.1809191638280.6250@planxty> (raw)
In-Reply-To: <20180904115700.461458689@redhat.com>
On Tue, 4 Sep 2018, Marcelo Tosatti wrote:
> Add -h (help) option to queuelat, which lists all
> options.
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>
> ---
> src/queuelat/README | 1 +
> src/queuelat/queuelat.c | 17 ++++++++++++++++-
> 2 files changed, 17 insertions(+), 1 deletion(-)
>
> Index: rt-tests/src/queuelat/README
> ===================================================================
> --- rt-tests.orig/src/queuelat/README 2018-09-03 16:31:38.578945651 -0300
> +++ rt-tests/src/queuelat/README 2018-09-03 16:31:56.083000015 -0300
> @@ -51,6 +51,7 @@
> mpps(million-packet-per-sec): million packets per second (float).
> tsc_freq_mhz: TSC frequency in MHz, as measured by TSC PIT calibration
> (search for "Detected XXX MHz processor" in dmesg, and use the integer part).
> +timeout: timeout (in seconds).
>
> How it works
> ============
> Index: rt-tests/src/queuelat/queuelat.c
> ===================================================================
> --- rt-tests.orig/src/queuelat/queuelat.c 2018-09-03 16:31:38.578945651 -0300
> +++ rt-tests/src/queuelat/queuelat.c 2018-09-03 16:31:56.084000018 -0300
> @@ -532,6 +532,18 @@
> return nr_packets_drain_per_block;
> }
>
> +
> +void print_help(void)
> +{
> + printf("usage: queuelat [options]\n");
> + printf("-h show this help menu\n");
> + printf("-m max-queue-len (maximum latency allowed, in nanoseconds) (int)\n");
> + printf("-c cycles-per-packet (number of cycles to process one packet (int)\n");
> + printf("-p million-packet-per-sec (million packets per second) (float)\n");
> + printf("-f tsc-freq-mhz (TSC frequency in MHz) (float)\n");
> + printf("-t timeout (timeout, in seconds) (int)\n");
> +}
> +
> int main(int argc, char **argv)
> {
> double tsc_freq_mhz;
> @@ -549,7 +561,7 @@
>
> opterr = 0;
>
> - while ((c = getopt (argc, argv, "m:c:p:f:t:q:")) != -1)
> + while ((c = getopt (argc, argv, "m:c:p:f:t:q:h")) != -1)
> switch (c)
> {
> case 'm':
> @@ -570,6 +582,9 @@
> case 'q':
> qvalue = optarg;
> break;
> + case 'h':
> + print_help();
> + return 0;
> case '?':
> if (optopt == 'm' || optopt == 'c' || optopt == 'p' ||
> optopt == 'f' || optopt == 't' || optopt == 'q')
>
>
>
Signed-off-by: John Kacur <jkacur@redhat.com
next parent reply other threads:[~2018-09-19 20:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180904115633.410153367@redhat.com>
[not found] ` <20180904115700.461458689@redhat.com>
2018-09-19 14:39 ` John Kacur [this message]
[not found] ` <20180904115701.634017140@redhat.com>
2018-09-19 14:41 ` [patch 2/2] Add queuelat manpage John Kacur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.21.1809191638280.6250@planxty \
--to=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).