Files
gronod 66401bec28
MacMonitor CI/CD Pipeline / Build & Test (Intel x86_64) (push) Canceled after 0s
feat(telemetry): implement load average and thread concurrency provider (fixes #7)
2026-09-08 12:33:14 +01:00

34 lines
1.1 KiB
Objective-C

#ifndef MMLoadAverageProvider_h
#define MMLoadAverageProvider_h
#import <Foundation/Foundation.h>
#import "MMTelemetryProvider.h"
NS_ASSUME_NONNULL_BEGIN
/**
* MMLoadAverageProvider
* Samples 1m, 5m, and 15m system load averages, Mach concurrency factors,
* and system-wide task and thread counts.
*/
@interface MMLoadAverageProvider : NSObject <MMTelemetryProvider>
- (instancetype)init;
/**
* Pure calculator method for deterministic unit testing.
*/
+ (NSDictionary<NSString *, id> *)calculateLoadMetricsWithLoad1:(double)load1
load5:(double)load5
load15:(double)load15
taskCount:(int)taskCount
threadCount:(int)threadCount
cpuCount:(int)cpuCount
machFactor:(double)machFactor;
@end
NS_ASSUME_NONNULL_END
#endif /* MMLoadAverageProvider_h */