Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: tools/gardening/lib/src/bot.dart

Issue 2996013002: Fix index bug in readResults (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gardening/lib/src/compare_failures_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gardening/lib/src/bot.dart
diff --git a/tools/gardening/lib/src/bot.dart b/tools/gardening/lib/src/bot.dart
index 56015c326c548fd1b315527736db82006c115b60..d8893f95bbb2ea030c624583d5b141b3a9b1a937 100644
--- a/tools/gardening/lib/src/bot.dart
+++ b/tools/gardening/lib/src/bot.dart
@@ -40,6 +40,9 @@ class Bot {
return _client.readResult(buildUri);
}
+ /// Maximum number of [BuildResult]s read concurrently by [readResults].
+ static const maxParallel = 20;
+
/// Reads the build results of all given uris.
///
/// Returns a list of the results. If a uri couldn't be read, then the entry
@@ -47,7 +50,6 @@ class Bot {
Future<List<BuildResult>> readResults(List<BuildUri> buildUris) async {
var result = <BuildResult>[];
int i = 0;
- const maxParallel = 20;
while (i < buildUris.length) {
var end = i + maxParallel;
if (end > buildUris.length) end = buildUris.length;
@@ -60,7 +62,7 @@ class Bot {
}
return result;
})));
- i = end + 1;
+ i = end;
}
return result;
}
« no previous file with comments | « no previous file | tools/gardening/lib/src/compare_failures_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698