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

Commit 60a90519 authored by Carlos Llamas's avatar Carlos Llamas Committed by Alice Ryhl
Browse files

binderThroughputTest: gather servers right away



Start gathering servers upon worker creation. Don't wait until signaled
by test. This should allow all clients to start transactions at a better
coordinated time.

Change-Id: I4568eb55fc9ce18839c1e5592a722a0284987745
Test: Ran a benchmark on cuttlefish, and it did not get stuck
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
Co-developed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
parent 14b243b1
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -220,6 +220,9 @@ void worker_fx(int num,
        workers.push_back(serviceMgr->waitForService(generateServiceName(i)));
    }

    p.signal();
    p.wait();

    // Run the benchmark if client
    ProcResults results(iterations);

@@ -300,8 +303,15 @@ void run_main(int iterations,
        pipes.push_back(make_worker(i, iterations, workers, payload_size, cs_pair));
    }
    wait_all(pipes);
    // All workers have now been spawned and added themselves to service
    // manager. Signal each worker to obtain a handle to the server workers from
    // servicemanager.
    signal_all(pipes);
    // Wait for each worker to finish obtaining a handle to all server workers
    // from servicemanager.
    wait_all(pipes);

    // Run the workers and wait for completion.
    // Run the benchmark and wait for completion.
    chrono::time_point<chrono::high_resolution_clock> start, end;
    cout << "waiting for workers to complete" << endl;
    start = chrono::high_resolution_clock::now();