...
|
...
|
@@ -12,6 +12,7 @@ |
|
|
#import <objc/message.h>
|
|
|
#import "YH_EventCollector.h"
|
|
|
#import "YHLog.h"
|
|
|
#import "YHEventReport.h"
|
|
|
|
|
|
@implementation SDWebImageDownloaderOperation (AutoTrack)
|
|
|
|
...
|
...
|
@@ -61,25 +62,34 @@ |
|
|
|
|
|
- (void) yher_operationStart
|
|
|
{
|
|
|
[[YH_EventCollector sharedInstance] timeEventStartWithWebImageDownload:self];
|
|
|
if ([YHEventReport sharedInstance].isPerformanceTrackEnabled){
|
|
|
[[YH_EventCollector sharedInstance] timeEventStartWithWebImageDownload:self];
|
|
|
}
|
|
|
|
|
|
[self yher_operationStart];
|
|
|
}
|
|
|
|
|
|
- (void) yher_operationDidFinish
|
|
|
{
|
|
|
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownload:self status:YHEventLoadStatusSuc];
|
|
|
if ([YHEventReport sharedInstance].isPerformanceTrackEnabled){
|
|
|
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownload:self status:YHEventLoadStatusSuc];
|
|
|
}
|
|
|
[self yher_operationDidFinish];
|
|
|
}
|
|
|
|
|
|
- (void) yher_operationCancel
|
|
|
{
|
|
|
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownload:self status:YHEventLoadStatusFailed];
|
|
|
if ([YHEventReport sharedInstance].isPerformanceTrackEnabled){
|
|
|
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownload:self status:YHEventLoadStatusFailed];
|
|
|
}
|
|
|
[self yher_operationCancel];
|
|
|
}
|
|
|
|
|
|
- (void) yher_operationError :(NSError*)error
|
|
|
{
|
|
|
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownload:self status:YHEventLoadStatusFailed];
|
|
|
if ([YHEventReport sharedInstance].isPerformanceTrackEnabled){
|
|
|
[[YH_EventCollector sharedInstance] timeEventEndWithWebImageDownload:self status:YHEventLoadStatusFailed];
|
|
|
}
|
|
|
[self yher_operationError:error];
|
|
|
}
|
|
|
|
...
|
...
|
|