Authored by John Tai

修复sdwebimage下载时间统计的bug.reviewed by yulaing

... ... @@ -53,7 +53,7 @@
{
if ([YHEventReport sharedInstance].isPerformanceTrackEnabled && [YHEventReport sharedInstance].isImagePerformanceTrackEnable){
[[YH_EventCollector sharedInstance] timeEventStartWithWebImageDownload:self];
[[YH_EventCollector sharedInstance] timeEventStartWithWebImageDownloadURL:url.absoluteString];
}
return [self yher_downloadImageWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
... ... @@ -61,9 +61,8 @@
if ([YHEventReport sharedInstance].isPerformanceTrackEnabled && [YHEventReport sharedInstance].isImagePerformanceTrackEnable){
if (cacheType == SDImageCacheTypeNone) {//暂时只去下载的图片的时间,过滤掉读缓存的时间
if (error) {
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownload:self url:[NSString stringWithFormat:@"%@",url] status:YHEventLoadStatusFailed];
}else{
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownload:self url:[NSString stringWithFormat:@"%@",url] status:YHEventLoadStatusSuc];
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownloadURL:url.absoluteString status:YHEventLoadStatusFailed];
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownloadURL:url.absoluteString status:YHEventLoadStatusSuc];
}
}
}
... ...
... ... @@ -21,8 +21,8 @@
- (void)timeEventStartWithWebView:(UIWebView *)webView;
- (void)timeEventEndWithWebView:(UIWebView *)webView status:(YHEventLoadStatus)status;
- (void)timeEventStartWithWebImageDownload:(SDWebImageManager *)downloaderOperation;
- (void)timeEventEndWithWebImageDownload:(SDWebImageManager *)downloaderOperation url:(NSString*)url status:(YHEventLoadStatus)status;
- (void)timeEventStartWithWebImageDownloadURL:(NSString *)imageURL;
- (void)timeEventEndWithWebImageDownloadURL:(NSString*)imageURL status:(YHEventLoadStatus)status;
- (void)timeEventStartWithUIControl:(UIControl *)control;
- (void)timeEventEndWithUIControl:(UIControl *)control;
... ...