Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71686da5 authored by Carlos Llamas's avatar Carlos Llamas Committed by Alice Ryhl
Browse files

binderThroughputTest: match argv parsing with early continue



Some argv[] parsing options use continue and others don't. Lets match
all of them with the same early "skip loop" behavior.

Change-Id: Iafbfb65d908c5163697d42b63d4f18b9be520fd8
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
parent 8c513522
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -363,17 +363,20 @@ int main(int argc, char *argv[])
        if (string(argv[i]) == "-s") {
        if (string(argv[i]) == "-s") {
            payload_size = atoi(argv[i+1]);
            payload_size = atoi(argv[i+1]);
            i++;
            i++;
            continue;
        }
        }
        if (string(argv[i]) == "-p") {
        if (string(argv[i]) == "-p") {
            // client/server pairs instead of spreading
            // client/server pairs instead of spreading
            // requests to all workers. If true, half
            // requests to all workers. If true, half
            // the workers become clients and half servers
            // the workers become clients and half servers
            cs_pair = true;
            cs_pair = true;
            continue;
        }
        }
        if (string(argv[i]) == "-t") {
        if (string(argv[i]) == "-t") {
            // Run one training round before actually collecting data
            // Run one training round before actually collecting data
            // to get an approximation of max latency.
            // to get an approximation of max latency.
            training_round = true;
            training_round = true;
            continue;
        }
        }
        if (string(argv[i]) == "-m") {
        if (string(argv[i]) == "-m") {
            // Caller specified the max latency in microseconds.
            // Caller specified the max latency in microseconds.
@@ -386,6 +389,7 @@ int main(int argc, char *argv[])
                cout << "Max latency -m must be positive." << endl;
                cout << "Max latency -m must be positive." << endl;
                exit(EXIT_FAILURE);
                exit(EXIT_FAILURE);
            }
            }
            continue;
        }
        }
    }
    }