[vm/concurrency] Print something periodically to prevent bot from dying due to no-output

TEST=Attempt at fixing "iso-stress-linux" builder infra failure.

Change-Id: I81b23d78bf7401cf41f54a0b6e28cfbd1fc5a304
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200424
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
Martin Kustermann 2021-05-18 15:00:03 +00:00 committed by commit-bot@chromium.org
parent ba6542d53b
commit 8c4dcce5aa

View file

@ -124,13 +124,24 @@ main(List<String> arguments) async {
final shards = int.parse(options['shards']);
final shard = int.parse(options['shard']) - 1;
final thisShardsConfigurations = [];
for (int i = 0; i < configurations.length; i++) {
if ((i % shards) == shard) {
thisShardsConfigurations.add(configurations[i]);
// Tasks will eventually be killed if they do not have any output for some
// time. So we'll explicitly print something every 4 minutes.
final sw = Stopwatch()..start();
final timer = Timer.periodic(const Duration(minutes: 4), (_) {
print('[${sw.elapsed}] ... still working ...');
});
try {
final thisShardsConfigurations = [];
for (int i = 0; i < configurations.length; i++) {
if ((i % shards) == shard) {
thisShardsConfigurations.add(configurations[i]);
}
}
}
for (final config in thisShardsConfigurations) {
await config.runTest();
for (final config in thisShardsConfigurations) {
await config.runTest();
}
} finally {
timer.cancel();
}
}