Authored by 朱小军

Merge branch '627master' into 'master'

thread safty & image metrics report control



See merge request !24
... ... @@ -16,7 +16,7 @@
@property (copy, nonatomic) NSString *os; // 操作系统
@property (copy, nonatomic) NSString *osv; // 操作系统版本
@property (copy, nonatomic) NSString *dm; // 设备型号
@property (copy, nonatomic) NSString *ps; // 手机系统推送开关状态
@property (copy, atomic) NSString *ps; // 手机系统推送开关状态
@property (copy, nonatomic) NSString *av; // app版本号
@property (copy, nonatomic) NSString *ab; // app build号
@property (copy, nonatomic) NSString *net; // 当前网络状态 0-未知,1-Wifi,2-2G,3-3F,4-4G
... ...
... ... @@ -79,6 +79,9 @@
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[[NSNotificationCenter defaultCenter] addObserverForName:@"yoho_image_download_network_metrics" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * _Nonnull note) {
if (![YHEventReport sharedInstance].isAppReportEnable || ![YHEventReport sharedInstance].isImagePerformanceTrackEnable) {
return ;
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[self reportImageViewPerformanceForNotification:note];
});
... ...