summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangchengwei <[email protected]>2024-04-24 10:26:02 +0800
committerzhangchengwei <[email protected]>2024-04-24 10:26:02 +0800
commitdb487d4a75bc65117b6a08483141055552ef831e (patch)
tree83d1776fe50bd0263e0e54c02b30937b12ac5975
parentae4076aa4330c917b003a67cd7adfb2550f46597 (diff)
1.增加statistic获取结果时间
-rw-r--r--getLog.py2
-rw-r--r--verify.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/getLog.py b/getLog.py
index 81fec1e..ade497b 100644
--- a/getLog.py
+++ b/getLog.py
@@ -239,7 +239,7 @@ class GetLog():
statistics_value[k] += v
if "client_ip_matched_objects".lower() in result_list[0].keys() or "server_ip_matched_objects".lower() in result_list[0].keys() or "websketch_categories".lower() in result_list[0].keys():
break
- if "session_identifier_sketch" in result_list[0].keys(): # session_identifier_sketch 需要单独处理
+ if "session_identifier_sketch" in result_list[0].keys() or "client_ip_sketch" in result_list[0].keys() or "server_ip_sketch" in result_list[0].keys(): # session_identifier_sketch 需要单独处理
sum_1 = 0
for i in range(1, len(tmp_list_1) - 1): # 去掉首位两个数计算平均数
sum_1 += tmp_list_1[i]
diff --git a/verify.py b/verify.py
index f3bf0a8..0acfa26 100644
--- a/verify.py
+++ b/verify.py
@@ -403,7 +403,7 @@ class Verify():
for statistics_info in statistics_info_list:
n = 1 #自增变量
fail_count = 1 #失败重试变量
- while n < 4:
+ while n < 6:
time.sleep(70)
now = datetime.utcnow()
end_time = now.strftime('%Y-%m-%dT%H:%M:%SZ') # 重新获取结束时间
@@ -412,7 +412,7 @@ class Verify():
if metric_result == True: # 返回结果不等于333,则退出循环查询
break
elif metric_result == False: # 查询验证失败时,再查询验证一次
- if fail_count > 3:
+ if fail_count > 5:
break
fail_count += 1
elif metric_results[0] == 333 and metric_results[1] == "passthrough": # session的incoming outgoing,fqdn_category区分判断