Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
tdancheva committed Oct 16, 2023
1 parent 1042bf3 commit 2c51fef
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions x-pack/metricbeat/module/azure/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import (
"strings"
"time"

"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources"

"github.com/elastic/beats/v7/metricbeat/mb"
"github.com/elastic/elastic-agent-libs/logp"
)
Expand Down Expand Up @@ -113,9 +110,6 @@ func (client *Client) GetMetricValues(metrics []Metric, report mb.ReporterV2) []
//if timegrain is larger than intervalx2 then interval will be assigned the timegrain value
interval := client.Config.Period
duration := convertTimegrainToDuration(metric.TimeGrain)
if t := duration; t > interval*2 {
//interval = t
}

// Adjust end time based on timegrain
endTime = endTime.Add(interval * (-1))
Expand Down Expand Up @@ -145,7 +139,7 @@ func (client *Client) GetMetricValues(metrics []Metric, report mb.ReporterV2) []

in_flag := false

for d := startTime; d.After(endTime) == false; d = d.Add(increment) {
for d := startTime; !d.After(endTime); d = d.Add(increment) {
// if timegrain is in unit hours
if duration >= time.Hour {
// if hour mark is within the timespan
Expand Down

0 comments on commit 2c51fef

Please sign in to comment.