...
|
...
|
@@ -18,45 +18,45 @@ |
|
|
|
|
|
op.startTS = [[NSDate date]timeIntervalSince1970];
|
|
|
|
|
|
NSLog(@"%@ did start========> %f",op, op.startTS);
|
|
|
NSLog(@"%@ \n did start========> %f",op.request.URL, op.startTS);
|
|
|
|
|
|
} error:NULL];
|
|
|
|
|
|
// finish
|
|
|
[AFURLConnectionOperation aspect_hookSelector:@selector(finish) withOptions:AspectPositionBefore usingBlock:^(id<AspectInfo>aspectInfo){
|
|
|
[AFURLConnectionOperation aspect_hookSelector:@selector(finish) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo>aspectInfo){
|
|
|
AFURLConnectionOperation *op = [aspectInfo instance];
|
|
|
|
|
|
op.finishTS = [[NSDate date]timeIntervalSince1970];
|
|
|
|
|
|
long deltaTS = (op.finishTS - op.startTS) * 1000;
|
|
|
|
|
|
NSLog(@"%@ error =======>%ld",op, deltaTS);
|
|
|
NSLog(@"%@ \n finsh =======>%ld",op.request.URL, deltaTS);
|
|
|
|
|
|
} error:NULL];
|
|
|
|
|
|
|
|
|
// error
|
|
|
[AFURLConnectionOperation aspect_hookSelector:@selector(connection:didFailWithError:) withOptions:AspectPositionBefore usingBlock:^(id<AspectInfo>aspectInfo){
|
|
|
[AFURLConnectionOperation aspect_hookSelector:@selector(connection:didFailWithError:) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo>aspectInfo){
|
|
|
AFURLConnectionOperation *op = [aspectInfo instance];
|
|
|
|
|
|
op.errorTS = [[NSDate date]timeIntervalSince1970];
|
|
|
|
|
|
long deltaTS = (op.errorTS - op.startTS) * 1000;
|
|
|
|
|
|
NSLog(@"%@ error =======>%ld",op, deltaTS);
|
|
|
NSLog(@"%@ \n error =======>%ld",op.request.URL, deltaTS);
|
|
|
|
|
|
} error:NULL];
|
|
|
|
|
|
|
|
|
// cancel
|
|
|
[AFURLConnectionOperation aspect_hookSelector:@selector(cancelConnection) withOptions:AspectPositionBefore usingBlock:^(id<AspectInfo>aspectInfo){
|
|
|
[AFURLConnectionOperation aspect_hookSelector:@selector(cancelConnection) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo>aspectInfo){
|
|
|
AFURLConnectionOperation *op = [aspectInfo instance];
|
|
|
|
|
|
op.cancelTS = [[NSDate date]timeIntervalSince1970];
|
|
|
|
|
|
long deltaTS = (op.cancelTS - op.startTS) * 1000;
|
|
|
|
|
|
NSLog(@"%@ error =======>%ld",op, deltaTS);
|
|
|
NSLog(@"%@ \n cancel =======>%ld",op.request.URL, deltaTS);
|
|
|
|
|
|
} error:NULL];
|
|
|
|
...
|
...
|
|