Amend help message to reflect latest changes 05/268905/2
authorAdam Michalski <a.michalski2@partner.samsung.com>
Tue, 4 Jan 2022 14:36:05 +0000 (15:36 +0100)
committerAdam Michalski <a.michalski2@partner.samsung.com>
Tue, 4 Jan 2022 15:31:12 +0000 (16:31 +0100)
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

benchmark/common.c
benchmark/p2p-gdbus.c

index d916711018b721ef74e0ee22ad0f5720075a6d49..a459b7fb9e59b52b472eae22a1c591c1b6b04090 100644 (file)
@@ -17,14 +17,11 @@ int cpu_pin(int cpuid, int pid) {
 
 void print_help(char **argv)
 {
-       printf("%s [-m <message size>] [-p <#process>] [-b] [-l] [-h]\n", argv[0]);
+       printf("%s [-m <message size>] [-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");
 }
index 7f4888e0847050930cf7b92a5e7b96170ff64fcd..779e44d2f93403558e6015e219a0520e746f82fc 100644 (file)
@@ -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 <message size>] [-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);
        }