Measure performance for ASCellNode layout (#2209)

* Measure performance for ASCellNode layout

* Address Adlai and Levi's feedback:
* Move to ASDisplayNode level
* Lock around setting/getting measurement options and results
* Record all measurement passes and report times as an array
* Only add relevant entries to the performanceMetrics dictionary
* Rebase

* Store sum and count instead of array

* Rename ScopeTimerDataPoint to ScopeTimerSum

* Address Levi's feedback

* Address Adlai's feedback
This commit is contained in:
Harry Shamansky
2016-09-09 10:38:13 -07:00
committed by Adlai Holler
parent 8c2f3f666f
commit 59fbfb682d
4 changed files with 100 additions and 3 deletions

View File

@@ -22,6 +22,8 @@
#import "ASEnvironment.h"
#import "ASObjectDescriptionHelpers.h"
#import "ASDisplayNode+Beta.h"
@protocol _ASDisplayLayerDelegate;
@class _ASDisplayLayer;
@class _ASPendingState;
@@ -163,6 +165,13 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
CGPoint _accessibilityActivationPoint;
UIBezierPath *_accessibilityPath;
// performance measurement
ASDisplayNodePerformanceMeasurementOptions _measurementOptions;
NSTimeInterval _layoutSpecTotalTime;
NSUInteger _layoutSpecNumberOfPasses;
NSTimeInterval _layoutGenerationTotalTime;
NSUInteger _layoutGenerationNumberOfPasses;
#if TIME_DISPLAYNODE_OPS
@public
NSTimeInterval _debugTimeToCreateView;