Skip to content

Commit

Permalink
Merge pull request #143 from DanielSpindler83/detect-anomaly-remove-f…
Browse files Browse the repository at this point in the history
…ixed-monthly-timeframe

remove hardcoded timeframe that limits detect anomaly to last 30 day…
  • Loading branch information
mivano authored May 20, 2024
2 parents 92da901 + 6f31512 commit bb2ec62
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Commands/DetectAnomaly/DetectAnomaly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ public override async Task<int> ExecuteAsync(CommandContext context, DetectAnoma
}
}

// Change the settings so it uses a custom timeframe and fetch the last 30 days of data, not including today

settings.Timeframe = TimeframeType.Custom;
settings.From = DateOnly.FromDateTime(DateTime.Today.AddDays(-30));
settings.To = DateOnly.FromDateTime(DateTime.Today.AddDays(-1));

// Fetch the costs from the Azure Cost Management API
var dailyCost = await _costRetriever.RetrieveDailyCost(settings.Debug, settings.GetScope,
settings.Filter,
Expand Down

0 comments on commit bb2ec62

Please sign in to comment.