31 lines
1.2 KiB
Objective-C
31 lines
1.2 KiB
Objective-C
#ifndef MMNetworkBandwidthProvider_h
|
|
#define MMNetworkBandwidthProvider_h
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "MMTelemetryProvider.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
* MMNetworkBandwidthProvider
|
|
* Samples real-time network download and upload throughput, packets/sec, and error counts
|
|
* across physical (Wi-Fi, Ethernet) and virtual (VPN, bridge) network interfaces.
|
|
*/
|
|
@interface MMNetworkBandwidthProvider : NSObject <MMTelemetryProvider>
|
|
|
|
- (instancetype)init;
|
|
|
|
/**
|
|
* Pure calculator method for deterministic unit testing.
|
|
*/
|
|
+ (NSDictionary<NSString *, id> *)calculateBandwidthMetricsWithCurrentSnapshots:(NSDictionary<NSString *, NSDictionary<NSString *, NSNumber *> *> *)current
|
|
previousSnapshots:(nullable NSDictionary<NSString *, NSDictionary<NSString *, NSNumber *> *> *)previous
|
|
timeDelta:(NSTimeInterval)timeDelta
|
|
ipAddresses:(nullable NSDictionary<NSString *, NSString *> *)ipAddresses;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
#endif /* MMNetworkBandwidthProvider_h */
|