platform/experiment/logging/bin/main.dart
thomashii@dukefirehawk.com 572a134c9c Fixed temporal mapping
2022-07-24 12:00:10 +08:00

22 lines
435 B
Dart

import 'dart:isolate';
Future<void> runApp(var message) async {
var stopwatch = Stopwatch()..start();
// Do something
print('Execution($message) Time: ${stopwatch.elapsed.inMilliseconds}ms');
stopwatch.stop();
}
void main() async {
var concurrency = 6000;
for (var i = 0; i < concurrency; i++) {
Isolate.spawn(runApp, 'Instance_$i');
}
await Future.delayed(const Duration(seconds: 10));
//print("Exit");
}