@cloud-carbon-footprint/aws
Version:
The core logic to get cloud usage data and estimate energy and carbon emissions from Amazon Web Services.
18 lines (17 loc) • 1.04 kB
TypeScript
import { ComputeEstimator, ICloudRecommendationsService, MemoryEstimator, StorageEstimator } from '@cloud-carbon-footprint/core';
import { RecommendationResult } from '@cloud-carbon-footprint/common';
import { ServiceWrapper } from '../ServiceWrapper';
export default class ComputeOptimizerRecommendations implements ICloudRecommendationsService {
private readonly computeEstimator;
private readonly memoryEstimator;
private readonly ssdStorageEstimator;
private readonly hddStorageEstimator;
private readonly serviceWrapper;
private readonly recommendationsLogger;
constructor(computeEstimator: ComputeEstimator, memoryEstimator: MemoryEstimator, ssdStorageEstimator: StorageEstimator, hddStorageEstimator: StorageEstimator, serviceWrapper: ServiceWrapper);
getRecommendations(centralComputeOptimizerBucket: string): Promise<RecommendationResult[]>;
private getRecommendationDetail;
private getComputeAndMemoryFootprintEstimates;
private getStorageFootprintEstimate;
private volumeTypeIsSSD;
}