32 lines
861 B
Objective-C
32 lines
861 B
Objective-C
#ifndef MMGPUTelemetryProvider_h
|
|
#define MMGPUTelemetryProvider_h
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "MMTelemetryProvider.h"
|
|
#import "MMAppleSMCClient.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
* MMGPUTelemetryProvider
|
|
* Samples Intel Integrated Graphics (Iris/UHD) and AMD Discrete Graphics (Radeon/Vega)
|
|
* utilization, VRAM allocation, and thermal metrics via IOKit and Metal.
|
|
*/
|
|
@interface MMGPUTelemetryProvider : NSObject <MMTelemetryProvider>
|
|
|
|
@property (nonatomic, strong, readonly) MMAppleSMCClient *smcClient;
|
|
|
|
- (instancetype)init;
|
|
- (instancetype)initWithSMCClient:(MMAppleSMCClient *)client;
|
|
|
|
/**
|
|
* Pure calculator method for deterministic unit testing.
|
|
*/
|
|
+ (NSDictionary<NSString *, id> *)calculateGPUMetricsWithDevices:(NSArray<NSDictionary<NSString *, id> *> *)gpuDevices;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
#endif /* MMGPUTelemetryProvider_h */
|