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 VoidToNull = () => (VoidToNull = dart.constFn(dart.definiteFunctionType(co
re.Null, [])))(); | 7 let VoidToNull = () => (VoidToNull = dart.constFn(dart.definiteFunctionType(co
re.Null, [])))(); |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 }, VoidToNull()), 2000); | 69 }, VoidToNull()), 2000); |
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])}), | |
80 fields: () => ({name: core.String}), | 79 fields: () => ({name: core.String}), |
81 methods: () => ({ | 80 methods: () => ({ |
82 run: dart.definiteFunctionType(dart.void, []), | 81 run: dart.definiteFunctionType(dart.void, []), |
83 warmup: dart.definiteFunctionType(dart.void, []), | 82 warmup: dart.definiteFunctionType(dart.void, []), |
84 exercise: dart.definiteFunctionType(dart.void, []), | 83 exercise: dart.definiteFunctionType(dart.void, []), |
85 setup: dart.definiteFunctionType(dart.void, []), | 84 setup: dart.definiteFunctionType(dart.void, []), |
86 teardown: dart.definiteFunctionType(dart.void, []), | 85 teardown: dart.definiteFunctionType(dart.void, []), |
87 measure: dart.definiteFunctionType(core.double, []), | 86 measure: dart.definiteFunctionType(core.double, []), |
88 report: dart.definiteFunctionType(dart.void, []) | 87 report: dart.definiteFunctionType(dart.void, []) |
89 }), | 88 }), |
90 statics: () => ({measureFor: dart.definiteFunctionType(core.double, [core.Fu
nction, core.int])}), | 89 statics: () => ({measureFor: dart.definiteFunctionType(core.double, [core.Fu
nction, core.int])}), |
91 names: ['measureFor'] | 90 names: ['measureFor'] |
92 }); | 91 }); |
93 // Exports: | 92 // Exports: |
94 return { | 93 return { |
95 BenchmarkBase: BenchmarkBase$ | 94 BenchmarkBase: BenchmarkBase$ |
96 }; | 95 }; |
97 }); | 96 }); |
OLD | NEW |