monobench: shuffle benchmark order between samples

I had the thought that going through each bench in the same order is a bias we can avoid, however slight.

Change-Id: I2ef1a6f57c4d121883250d65ea2e98ebe834925d
Reviewed-on: https://skia-review.googlesource.com/6622
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Mike Klein 2017-01-05 14:08:50 -05:00 committed by Skia Commit-Bot
parent f09492bb42
commit 7c6bc4616c

View File

@ -94,6 +94,7 @@ int main(int argc, char** argv) {
int samples = 0;
while (samples < limit) {
std::random_shuffle(benches.begin(), benches.end());
for (auto& bench : benches) {
for (int loops = 1; loops < 1000000000;) {
bench.b->preDraw(nullptr);