30 lines
982 B
Objective-C
30 lines
982 B
Objective-C
#ifndef MMDiskIOProvider_h
|
|
#define MMDiskIOProvider_h
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "MMTelemetryProvider.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
* MMDiskIOProvider
|
|
* Samples real-time storage disk transfer rates (read/write bytes per second)
|
|
* and transaction rates (read/write IOPS) across internal and external block storage devices.
|
|
*/
|
|
@interface MMDiskIOProvider : NSObject <MMTelemetryProvider>
|
|
|
|
- (instancetype)init;
|
|
|
|
/**
|
|
* Pure calculator method for deterministic unit testing.
|
|
*/
|
|
+ (NSDictionary<NSString *, id> *)calculateDiskIOMetricsWithCurrentSnapshots:(NSDictionary<NSString *, NSDictionary<NSString *, NSNumber *> *> *)current
|
|
previousSnapshots:(nullable NSDictionary<NSString *, NSDictionary<NSString *, NSNumber *> *> *)previous
|
|
timeDelta:(NSTimeInterval)timeDelta;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
#endif /* MMDiskIOProvider_h */
|