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