Added MGLSDKMetricsManager to keep track of SDK related events such as tile download times. * [ios, macos] Add tile download performance event. * [ios, macos] Modify the performance event format. * [ios, macos] Add Mapbox Maps SDK events manager. * [ios, macos] Remove events delegate. * [ios, macos] Remove deprecated macro. * [ios, macos] Rename MGLEventsManager to MGLMetricsManager. * [ios, macos] Make MGLMetricsDelegate follow delegate convention. * [ios, macos] Remove mbgl-filesource target dependency on MGLMetricsManager. * [ios, macos] Update metrics manager documentation. * [ios, macos] Add device metadata. * [ios, macos] Rename MGLMetricsManager to MGLSDKMetricsManager.
26 lines
775 B
Objective-C
26 lines
775 B
Objective-C
#import "MGLNetworkConfiguration.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class MGLNetworkConfiguration;
|
|
@protocol MGLNetworkConfigurationMetricsDelegate <NSObject>
|
|
|
|
- (void)networkConfiguration:(MGLNetworkConfiguration *)networkConfiguration didGenerateMetricEvent:(NSDictionary *)metricEvent;
|
|
|
|
@end
|
|
|
|
extern NSString * const kMGLDownloadPerformanceEvent;
|
|
|
|
@interface MGLNetworkConfiguration (Private)
|
|
|
|
@property (nonatomic, strong) NSMutableDictionary<NSString*, NSDictionary*> *events;
|
|
@property (nonatomic, weak) id<MGLNetworkConfigurationMetricsDelegate> metricsDelegate;
|
|
|
|
- (void)startDownloadEvent:(NSString *)urlString type:(NSString *)resourceType;
|
|
- (void)stopDownloadEvent:(NSString *)urlString;
|
|
- (void)cancelDownloadEvent:(NSString *)urlString;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|