123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- //
- // QNUploadRequestMetrics.h
- // QiniuSDK
- //
- // Created by yangsen on 2020/4/29.
- // Copyright © 2020 Qiniu. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "QNUploadRegionInfo.h"
- NS_ASSUME_NONNULL_BEGIN
- @interface QNUploadSingleRequestMetrics : NSObject
- // 请求的 httpVersion
- @property(nonatomic, copy)NSString *httpVersion;
- // 只有进行网络检测才会有 connectCheckMetrics
- @property (nullable , strong) QNUploadSingleRequestMetrics *connectCheckMetrics;
- // 错误信息
- @property (nullable , strong) NSError *error;
- @property (nonatomic, copy) NSURLRequest *request;
- @property (nullable , copy) NSURLResponse *response;
- @property (nullable, copy) NSDate *startDate;
- @property (nullable, copy) NSDate *endDate;
- @property (nonatomic, strong, readonly) NSNumber *totalElapsedTime;
- @property (nullable, copy) NSDate *domainLookupStartDate;
- @property (nullable, copy) NSDate *domainLookupEndDate;
- @property (nonatomic, strong, readonly) NSNumber *totalDnsTime;
- @property (nullable, copy) NSDate *connectStartDate;
- @property (nullable, copy) NSDate *connectEndDate;
- @property (nonatomic, strong, readonly) NSNumber *totalConnectTime;
- @property (nullable, copy) NSDate *secureConnectionStartDate;
- @property (nullable, copy) NSDate *secureConnectionEndDate;
- @property (nonatomic, strong, readonly) NSNumber *totalSecureConnectTime;
- @property (nullable, copy) NSDate *requestStartDate;
- @property (nullable, copy) NSDate *requestEndDate;
- @property (nonatomic, strong, readonly) NSNumber *totalRequestTime;
- @property (nonatomic, strong, readonly) NSNumber *totalWaitTime;
- @property (nullable, copy) NSDate *responseStartDate;
- @property (nullable, copy) NSDate *responseEndDate;
- @property (nonatomic, strong, readonly) NSNumber *totalResponseTime;
- @property (assign) int64_t countOfRequestHeaderBytesSent;
- @property (assign) int64_t countOfRequestBodyBytesSent;
- @property (assign) int64_t countOfResponseHeaderBytesReceived;
- @property (assign) int64_t countOfResponseBodyBytesReceived;
- @property (nullable, copy) NSString *localAddress;
- @property (nullable, copy) NSNumber *localPort;
- @property (nullable, copy) NSString *remoteAddress;
- @property (nullable, copy) NSNumber *remotePort;
- @property (nonatomic, strong, readonly) NSNumber *totalBytes;
- @property (nonatomic, strong, readonly) NSNumber *bytesSend;
- //MARK:-- 构造
- + (instancetype)emptyMetrics;
- @end
- @interface QNUploadRegionRequestMetrics : NSObject
- @property (nonatomic, strong, readonly) NSNumber *totalElapsedTime;
- @property (nonatomic, strong, readonly) NSNumber *requestCount;
- @property (nonatomic, strong, readonly) NSNumber *bytesSend;
- @property (nonatomic, strong, readonly) id <QNUploadRegion> region;
- @property (nonatomic, copy, readonly) NSArray<QNUploadSingleRequestMetrics *> *metricsList;
- //MARK:-- 构造
- + (instancetype)emptyMetrics;
- - (instancetype)initWithRegion:(id <QNUploadRegion>)region;
- - (void)addMetricsList:(NSArray <QNUploadSingleRequestMetrics *> *)metricsList;
- - (void)addMetrics:(QNUploadRegionRequestMetrics*)metrics;
- @end
- @interface QNUploadTaskMetrics : NSObject
- @property (nonatomic, strong, readonly) NSNumber *totalElapsedTime;
- @property (nonatomic, strong, readonly) NSNumber *requestCount;
- @property (nonatomic, strong, readonly) NSNumber *bytesSend;
- @property (nonatomic, strong, readonly) NSNumber *regionCount;
- @property (nonatomic, strong) NSArray<id <QNUploadRegion>> *regions;
- //MARK:-- 构造
- + (instancetype)emptyMetrics;
- - (void)addMetrics:(QNUploadRegionRequestMetrics *)metrics;
- @end
- NS_ASSUME_NONNULL_END
|