Fix cache reading problem.
The previous implementation images a machine to match the
br(benchmarkrun)'s label before ReadCache is performed, that image step
is a huge waste.
Now re-implemented by starting a few threads at the very beginning to go
through all brs, and put cache-hit brs into _cached_br_list. Then we
start the DutWorker thread to go through _cached_br_list, which does not
require dut to bear any particular image. After this step, we proceed as usual.
Unittest cases also added.
Tested by manullay launch a crosperf and examining no re-image is done.
Change-Id: Ib611937f9fa28ae9bedce8a1a01ed303f14f838a
Reviewed-on: https://chrome-internal-review.googlesource.com/231585
Commit-Ready: Han Shen <shenhan@google.com>
Tested-by: Han Shen <shenhan@google.com>
Reviewed-by: Han Shen <shenhan@google.com>
6 files changed