OLD | NEW |
1 // Copyright (c) 2014, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'dart:fletch'; | 5 import 'dart:fletch'; |
6 | 6 |
7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
8 | 8 |
9 const int PROCESSES = 1000; | 9 const int PROCESSES = 1000; |
10 const int MESSAGES = 100; | 10 const int MESSAGES = 100; |
11 | 11 |
(...skipping 11 matching lines...) Expand all Loading... |
23 } | 23 } |
24 print("Took ${watch.elapsedMicroseconds} us to run $PROCESSES processes with " | 24 print("Took ${watch.elapsedMicroseconds} us to run $PROCESSES processes with " |
25 "$MESSAGES messages."); | 25 "$MESSAGES messages."); |
26 } | 26 } |
27 | 27 |
28 void processRun(Port output) { | 28 void processRun(Port output) { |
29 for (int i = MESSAGES; i >= 0; i--) { | 29 for (int i = MESSAGES; i >= 0; i--) { |
30 output.send(i); | 30 output.send(i); |
31 } | 31 } |
32 } | 32 } |
OLD | NEW |