Skip to content

Commit 8613c76

Browse files
authored
Merge pull request #22 from permutive/master
Align starttime and endtime to be based on the same time.Now() call
2 parents b6e7a8c + fc9a0c6 commit 8613c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collectors/monitoring_collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ func (c *MonitoringCollector) reportMonitoringMetrics(ch chan<- prometheus.Metri
156156

157157
errChannel := make(chan error, len(page.MetricDescriptors))
158158

159-
startTime := time.Now().UTC().Add(c.metricsInterval * -1).Add(c.metricsOffset * -1)
160159
endTime := time.Now().UTC().Add(c.metricsOffset * -1)
160+
startTime := endTime.Add(c.metricsInterval * -1)
161161

162162
for _, metricDescriptor := range page.MetricDescriptors {
163163
wg.Add(1)

0 commit comments

Comments
 (0)