diff --git a/React/Base/RCTPerformanceLogger.m b/React/Base/RCTPerformanceLogger.m index 9fc9647c89e3e5..542cdb46663191 100644 --- a/React/Base/RCTPerformanceLogger.m +++ b/React/Base/RCTPerformanceLogger.m @@ -101,6 +101,7 @@ void RCTPerformanceLoggerAppendEnd(RCTPLTag tag) @"NativeModuleMainThread", @"NativeModulePrepareConfig", @"NativeModuleInjectConfig", + @"NativeModuleMainThreadUsesCount", @"JSCExecutorSetup", @"RootViewTTI", @"BundleSize", diff --git a/React/Profiler/RCTPerfMonitor.m b/React/Profiler/RCTPerfMonitor.m index caf660385e8ba7..8bb54e49c07654 100644 --- a/React/Profiler/RCTPerfMonitor.m +++ b/React/Profiler/RCTPerfMonitor.m @@ -506,7 +506,12 @@ - (void)loadPerformanceLoggerData NSArray *values = RCTPerformanceLoggerOutput(); for (NSString *label in RCTPerformanceLoggerLabels()) { long long value = values[i+1].longLongValue - values[i].longLongValue; - NSString *unit = [label isEqualToString:@"BundleSize"] ? @"b" : @"ms"; + NSString *unit = @"ms"; + if ([label hasSuffix:@"Size"]) { + unit = @"b"; + } else if ([label hasSuffix:@"Count"]) { + unit = @""; + } [data addObject:[NSString stringWithFormat:@"%@: %lld%@", label, value, unit]]; i += 2; }