OLD | NEW |
1 // Copyright (c) 2014, the Dartino 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:dartino'; |
6 | 6 |
7 import '../BenchmarkBase.dart'; | 7 import '../BenchmarkBase.dart'; |
8 import 'utils.dart'; | 8 import 'utils.dart'; |
9 | 9 |
10 void main() { | 10 void main() { |
11 new IntraProcessChannelBenchmark().report(); | 11 new IntraProcessChannelBenchmark().report(); |
12 } | 12 } |
13 | 13 |
14 class IntraProcessChannelBenchmark extends BenchmarkBase { | 14 class IntraProcessChannelBenchmark extends BenchmarkBase { |
15 Channel input; | 15 Channel input; |
(...skipping 14 matching lines...) Expand all Loading... |
30 while (i > 0) { | 30 while (i > 0) { |
31 output.send(i); | 31 output.send(i); |
32 i = input.receive(); | 32 i = input.receive(); |
33 } | 33 } |
34 } | 34 } |
35 | 35 |
36 void teardown() { | 36 void teardown() { |
37 output.send(0); | 37 output.send(0); |
38 } | 38 } |
39 } | 39 } |
OLD | NEW |