add files changed count to reload metrics

Reviewed By: alexeylang

Differential Revision: D5694813

fbshipit-source-id: 2e2517e60a7547e261a7c15a3a9138dbb3cb9783
This commit is contained in:
Ben Nham
2017-08-31 05:25:19 -07:00
committed by Facebook Github Bot
parent 6ceb4fa53f
commit 259161f872
5 changed files with 33 additions and 2 deletions

View File

@@ -25,6 +25,11 @@ NS_ENUM(NSInteger) {
RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously = 1000,
};
NS_ENUM(NSInteger) {
RCTSourceFilesChangedCountNotBuiltByBundler = -2,
RCTSourceFilesChangedCountRebuiltFromScratch = -1,
};
@interface RCTLoadingProgress : NSObject
@property (nonatomic, copy) NSString *status;
@@ -55,6 +60,15 @@ NS_ENUM(NSInteger) {
*/
@property (nonatomic, readonly) NSUInteger length;
/**
* Returns number of files changed when building this bundle:
*
* - RCTSourceFilesChangedCountNotBuiltByBundler if the source wasn't built by the bundler (e.g. read from disk)
* - RCTSourceFilesChangedCountRebuiltFromScratch if the source was rebuilt from scratch by the bundler
* - Otherwise, the number of files changed when incrementally rebuilding the source
*/
@property (nonatomic, readonly) NSInteger filesChangedCount;
@end
typedef void (^RCTSourceLoadProgressBlock)(RCTLoadingProgress *progressData);