Commit 4994f8e8 authored by 胡凯旋's avatar 胡凯旋

batch size 20

parent 8b6dfbf3
......@@ -34,14 +34,12 @@ class TencentExporter(Exporter):
instance_id_list = self.instances.keys()
# 遍历所有指标
for label in self.metrics.keys():
print('-------------')
data_from_tencent[label] = []
# 一次批量取 batch_size 个实例的监控数据
batch_size = 10
batch_size = 20
for i in range(0, int(math.ceil(len(instance_id_list)/batch_size))):
instance_to_get = instance_id_list[batch_size*i : batch_size*(i+1)]
try:
print('(((((((())))))))))')
res = self.monitor.get_cdb_metric(instance_to_get, label, self.data_interval)
# print(res)
data_from_tencent[label].extend(res['DataPoints'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment