| 
									
										
										
										
											2015-10-13 00:29:13 -07:00
										 |  |  | import {runClickBenchmark, verifyNoBrowserErrors} from 'angular2/src/testing/perf_util'; | 
					
						
							| 
									
										
										
										
											2015-07-21 15:28:10 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | describe('ng2 static tree benchmark', function() { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   var URL = 'benchmarks/src/static_tree/tree_benchmark.html'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   afterEach(verifyNoBrowserErrors); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-02 10:35:51 -08:00
										 |  |  |   it('should log the ng stats', function(done) { | 
					
						
							| 
									
										
										
										
											2015-07-21 15:28:10 -07:00
										 |  |  |     runClickBenchmark({ | 
					
						
							|  |  |  |       url: URL, | 
					
						
							|  |  |  |       buttons: ['#ng2DestroyDom', '#ng2CreateDom'], | 
					
						
							|  |  |  |       id: 'ng2.static.tree.create.plain', | 
					
						
							| 
									
										
										
										
											2015-12-02 10:35:51 -08:00
										 |  |  |       params: [] | 
					
						
							| 
									
										
										
										
											2015-07-21 15:28:10 -07:00
										 |  |  |     }).then(done, done.fail); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   it('should log the ng stats (update)', function(done) { | 
					
						
							| 
									
										
										
										
											2015-12-02 10:35:51 -08:00
										 |  |  |     runClickBenchmark( | 
					
						
							|  |  |  |         {url: URL, buttons: ['#ng2CreateDom'], id: 'ng2.static.tree.update', params: []}) | 
					
						
							|  |  |  |         .then(done, done.fail); | 
					
						
							| 
									
										
										
										
											2015-07-21 15:28:10 -07:00
										 |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   it('should log the baseline stats', function(done) { | 
					
						
							|  |  |  |     runClickBenchmark({ | 
					
						
							|  |  |  |       url: URL, | 
					
						
							|  |  |  |       buttons: ['#baselineDestroyDom', '#baselineCreateDom'], | 
					
						
							| 
									
										
										
										
											2015-10-13 15:10:20 -07:00
										 |  |  |       id: 'baseline.static.tree.create', | 
					
						
							| 
									
										
										
										
											2015-12-02 10:35:51 -08:00
										 |  |  |       params: [] | 
					
						
							| 
									
										
										
										
											2015-07-21 15:28:10 -07:00
										 |  |  |     }).then(done, done.fail); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   it('should log the baseline stats (update)', function(done) { | 
					
						
							| 
									
										
										
										
											2015-12-02 10:35:51 -08:00
										 |  |  |     runClickBenchmark( | 
					
						
							|  |  |  |         {url: URL, buttons: ['#baselineCreateDom'], id: 'baseline.static.tree.update', params: []}) | 
					
						
							|  |  |  |         .then(done, done.fail); | 
					
						
							| 
									
										
										
										
											2015-07-21 15:28:10 -07:00
										 |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }); |