mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Revise performance measurement naming and structure (#2265)
* Revise performance measurement naming and structure - Revises naming from LayoutSpecGeneration to LayoutSpecComputation - Adds a struct instead of an NSDictionary to retrieve performance metrics - Includes ASEnvironmentStatePropagateDown in LayoutSpecComputation measurements * Revise SumScopeTimer to include enable flag * Make struct a typedef
This commit is contained in:
committed by
Adlai Holler
parent
5990376f68
commit
71fc2dd18d
@@ -38,16 +38,15 @@ ASDISPLAYNODE_EXTERN_C_END
|
||||
*/
|
||||
typedef NS_OPTIONS(NSUInteger, ASDisplayNodePerformanceMeasurementOptions) {
|
||||
ASDisplayNodePerformanceMeasurementOptionLayoutSpec = 1 << 0,
|
||||
ASDisplayNodePerformanceMeasurementOptionLayoutGeneration = 1 << 1
|
||||
ASDisplayNodePerformanceMeasurementOptionLayoutComputation = 1 << 1
|
||||
};
|
||||
|
||||
/**
|
||||
* Keys to retrieve performance entries from the performance dictionary.
|
||||
*/
|
||||
extern NSString *const ASDisplayNodeLayoutSpecTotalTimeKey;
|
||||
extern NSString *const ASDisplayNodeLayoutSpecNumberOfPassesKey;
|
||||
extern NSString *const ASDisplayNodeLayoutGenerationTotalTimeKey;
|
||||
extern NSString *const ASDisplayNodeLayoutGenerationNumberOfPassesKey;
|
||||
typedef struct {
|
||||
CFTimeInterval layoutSpecTotalTime;
|
||||
NSInteger layoutSpecNumberOfPasses;
|
||||
CFTimeInterval layoutComputationTotalTime;
|
||||
NSInteger layoutComputationNumberOfPasses;
|
||||
} ASDisplayNodePerformanceMeasurements;
|
||||
|
||||
@interface ASDisplayNode (Beta)
|
||||
|
||||
@@ -94,10 +93,9 @@ extern NSString *const ASDisplayNodeLayoutGenerationNumberOfPassesKey;
|
||||
@property (nonatomic, assign) ASDisplayNodePerformanceMeasurementOptions measurementOptions;
|
||||
|
||||
/**
|
||||
* @abstract A dictionary representing performance measurements collected.
|
||||
* @note see the constants above to retrieve relevant performance measurements
|
||||
* @abstract A simple struct representing performance measurements collected.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSDictionary *performanceMeasurements;
|
||||
@property (nonatomic, assign, readonly) ASDisplayNodePerformanceMeasurements performanceMeasurements;
|
||||
|
||||
/** @name Layout Transitioning */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user