Skip to content

Commit b32f7df

Browse files
authored
monitoring/metrics: update from 5 to 20 minutes (#2210)
1 parent ff8c2b4 commit b32f7df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

monitoring/api/v3/cloud-client/snippets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def list_time_series(project_id):
7878
interval.end_time.seconds = int(now)
7979
interval.end_time.nanos = int(
8080
(now - interval.end_time.seconds) * 10**9)
81-
interval.start_time.seconds = int(now - 300)
81+
interval.start_time.seconds = int(now - 1200)
8282
interval.start_time.nanos = interval.end_time.nanos
8383
results = client.list_time_series(
8484
project_name,
@@ -99,7 +99,7 @@ def list_time_series_header(project_id):
9999
interval.end_time.seconds = int(now)
100100
interval.end_time.nanos = int(
101101
(now - interval.end_time.seconds) * 10**9)
102-
interval.start_time.seconds = int(now - 300)
102+
interval.start_time.seconds = int(now - 1200)
103103
interval.start_time.nanos = interval.end_time.nanos
104104
results = client.list_time_series(
105105
project_name,
@@ -123,7 +123,7 @@ def list_time_series_aggregate(project_id):
123123
interval.start_time.seconds = int(now - 3600)
124124
interval.start_time.nanos = interval.end_time.nanos
125125
aggregation = monitoring_v3.types.Aggregation()
126-
aggregation.alignment_period.seconds = 300 # 5 minutes
126+
aggregation.alignment_period.seconds = 1200 # 20 minutes
127127
aggregation.per_series_aligner = (
128128
monitoring_v3.enums.Aggregation.Aligner.ALIGN_MEAN)
129129

@@ -150,7 +150,7 @@ def list_time_series_reduce(project_id):
150150
interval.start_time.seconds = int(now - 3600)
151151
interval.start_time.nanos = interval.end_time.nanos
152152
aggregation = monitoring_v3.types.Aggregation()
153-
aggregation.alignment_period.seconds = 300 # 5 minutes
153+
aggregation.alignment_period.seconds = 1200 # 20 minutes
154154
aggregation.per_series_aligner = (
155155
monitoring_v3.enums.Aggregation.Aligner.ALIGN_MEAN)
156156
aggregation.cross_series_reducer = (

0 commit comments

Comments
 (0)