count cache hits
Summary: @public Adds cache hit counts to layout stats. Reviewed By: SidharthGuglani Differential Revision: D13844022 fbshipit-source-id: 906b4ec5fe3314287911cee2c37d77c4aac76455
This commit is contained in:
parent
0dafa0de6b
commit
f506019e8b
|
@ -20,6 +20,8 @@ typedef YG_ENUM_BEGIN(YGMarker){
|
|||
typedef struct {
|
||||
int layouts;
|
||||
int measures;
|
||||
int cachedLayouts;
|
||||
int cachedMeasures;
|
||||
} YGMarkerLayoutData;
|
||||
|
||||
typedef union {
|
||||
|
|
|
@ -3803,6 +3803,9 @@ bool YGLayoutNodeInternal(
|
|||
layout->measuredDimensions[YGDimensionHeight] =
|
||||
cachedResults->computedHeight;
|
||||
|
||||
(performLayout ? layoutMarkerData.cachedLayouts
|
||||
: layoutMarkerData.cachedMeasures) += 1;
|
||||
|
||||
if (gPrintChanges && gPrintSkips) {
|
||||
YGLog(
|
||||
node,
|
||||
|
|
Loading…
Reference in New Issue