OLD | NEW |
1 define(['dart_sdk'], function(dart_sdk) { | 1 define(['dart_sdk'], function(dart_sdk) { |
2 'use strict'; | 2 'use strict'; |
3 const core = dart_sdk.core; | 3 const core = dart_sdk.core; |
4 const dart = dart_sdk.dart; | 4 const dart = dart_sdk.dart; |
5 const dartx = dart_sdk.dartx; | 5 const dartx = dart_sdk.dartx; |
6 const BenchmarkBase$ = Object.create(null); | 6 const BenchmarkBase$ = Object.create(null); |
7 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); | 7 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
8 BenchmarkBase$.Expect = class Expect extends core.Object { | 8 BenchmarkBase$.Expect = class Expect extends core.Object { |
9 static equals(expected, actual) { | 9 static equals(expected, actual) { |
10 if (!dart.equals(expected, actual)) { | 10 if (!dart.equals(expected, actual)) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 this.teardown(); | 70 this.teardown(); |
71 return result; | 71 return result; |
72 } | 72 } |
73 report() { | 73 report() { |
74 let score = this.measure(); | 74 let score = this.measure(); |
75 core.print(dart.str`${this.name}(RunTime): ${score} us.`); | 75 core.print(dart.str`${this.name}(RunTime): ${score} us.`); |
76 } | 76 } |
77 }; | 77 }; |
78 dart.setSignature(BenchmarkBase$.BenchmarkBase, { | 78 dart.setSignature(BenchmarkBase$.BenchmarkBase, { |
79 constructors: () => ({new: dart.definiteFunctionType(BenchmarkBase$.Benchmar
kBase, [core.String])}), | 79 constructors: () => ({new: dart.definiteFunctionType(BenchmarkBase$.Benchmar
kBase, [core.String])}), |
| 80 fields: () => ({name: core.String}), |
80 methods: () => ({ | 81 methods: () => ({ |
81 run: dart.definiteFunctionType(dart.void, []), | 82 run: dart.definiteFunctionType(dart.void, []), |
82 warmup: dart.definiteFunctionType(dart.void, []), | 83 warmup: dart.definiteFunctionType(dart.void, []), |
83 exercise: dart.definiteFunctionType(dart.void, []), | 84 exercise: dart.definiteFunctionType(dart.void, []), |
84 setup: dart.definiteFunctionType(dart.void, []), | 85 setup: dart.definiteFunctionType(dart.void, []), |
85 teardown: dart.definiteFunctionType(dart.void, []), | 86 teardown: dart.definiteFunctionType(dart.void, []), |
86 measure: dart.definiteFunctionType(core.double, []), | 87 measure: dart.definiteFunctionType(core.double, []), |
87 report: dart.definiteFunctionType(dart.void, []) | 88 report: dart.definiteFunctionType(dart.void, []) |
88 }), | 89 }), |
89 statics: () => ({measureFor: dart.definiteFunctionType(core.double, [core.Fu
nction, core.int])}), | 90 statics: () => ({measureFor: dart.definiteFunctionType(core.double, [core.Fu
nction, core.int])}), |
90 names: ['measureFor'] | 91 names: ['measureFor'] |
91 }); | 92 }); |
92 // Exports: | 93 // Exports: |
93 return { | 94 return { |
94 BenchmarkBase: BenchmarkBase$ | 95 BenchmarkBase: BenchmarkBase$ |
95 }; | 96 }; |
96 }); | 97 }); |
OLD | NEW |