From: Adam Michalski Date: Tue, 4 Jan 2022 14:36:05 +0000 (+0100) Subject: Amend help message to reflect latest changes X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c2c0e67215b53d06d40ac05fdc50099b6dbb97b;p=platform%2Fcore%2Fsystem%2Fdbus-tools.git Amend help message to reflect latest changes Due to recent changes, the help message is no longer up to date. As GD-Bus peer to peer tests have additional command line options, a separate help message had to be created for them. Change-Id: Ib6ba927f74ea926bb683489bd85dcb535258ecda --- diff --git a/benchmark/common.c b/benchmark/common.c index d916711..a459b7f 100644 --- a/benchmark/common.c +++ b/benchmark/common.c @@ -17,14 +17,11 @@ int cpu_pin(int cpuid, int pid) { void print_help(char **argv) { - printf("%s [-m ] [-p <#process>] [-b] [-l] [-h]\n", argv[0]); + printf("%s [-m ] [-p <#process>] [-b] [-l] [-t <#real_tries>] [-h]\n", argv[0]); printf("-m: message size\n"); printf("-p: the number of process (default: the number of CPU)\n"); printf("-b: measure bandwidth\n"); printf("-l: measure latency\n"); printf("-t: number of real tries (default: 1000)\n"); - printf("-c: specifies whether client & server processes should be pinned " - "to the same or different CPU cores (default: different)\n"); - printf("-v: verbose (both receiving & sending parties)\n"); printf("-h: print help page\n"); } diff --git a/benchmark/p2p-gdbus.c b/benchmark/p2p-gdbus.c index 7f4888e..779e44d 100644 --- a/benchmark/p2p-gdbus.c +++ b/benchmark/p2p-gdbus.c @@ -574,6 +574,21 @@ void Measure_bandwidth(bool verbose) printf("Total bandwidth: %llu (/s)\n", bw); } +void print_help_p2p_gdbus(char **argv) +{ + printf("%s [-m ] [-p <#processes>] [-b] [-l] [-t <#real_tries>]" + " [-c] [-v] [-h]\n" + "-m: message size\n" + "-p: number of processes (default: number of CPUs)\n" + "-b: measure bandwidth\n" + "-l: measure latency\n" + "-t: number of real tries (default: 1000)\n" + "-c: specifies whether client & server processes should be pinned" + " to the same or different CPU cores (default: different)\n" + "-v: verbose (both receiving & sending parties)\n" + "-h: print help page\n", argv[0]); +} + int main(int argc, char *argv[]) { int opt; @@ -624,12 +639,13 @@ int main(int argc, char *argv[]) raw_data_on = true; /* dump raw data */ break; case 'h': - print_help(argv); + print_help_p2p_gdbus(argv); exit(0); } } if (!lt_on && !bw_on) { + print_help_p2p_gdbus(argv); exit(0); }