Русский
Открыть в Telegram

Постdef process_usage_logs(usage_records, reference_day, region_details, profiles, region_stats):

19 июля 2026
D
Deloitte | COGNIZANT | IBM | CAPGEMINI
def process_usage_logs(usage_records, reference_day, region_details, profiles, region_stats): for record in usage_records: usage_id, region_id, usage_day, cpu_usage, memory_usage = record usage_day = int(usage_day) cpu_usage = int(cpu_usage) memory_usage = int(memory_usage) if region_id not in region_details: continue if not (1 <= usage_day <= reference_day): continue if cpu_usage < 0 or memory_usage < 0: continue region_type = region_details[region_id][1] max_cpu, max_mem = profiles[region_type] stats = region_stats[region_id] stats["valid_usage_count"] += 1 stats["cpu_sum"] += cpu_usage stats["memory_sum"] += memory_usage if cpu_usage > max_cpu: stats["cpu_breach_count"] += 1 if memory_usage > max_mem: stats["memory_breach_count"] += 1 def process_deployments(deployment_records, reference_day, region_details, region_stats): for record in deployment_records: deployment_id, region_id, deployment_day, deployment_status = record deployment_day = int(deployment_day) if region_id not in region_details: continue if deployment_status not in VALID_DEPLOYMENT_STATUSES: continue if not (1 <= deployment_day <= reference_day): continue if deployment_status == "ACTIVE": region_stats[region_id]["active_deployment_count"] += 1 def process_incident_reports(incident_records, reference_day, region_details, region_stats): for record in incident_records: incident_id, region_id, incident_day, severity = record incident_day = int(incident_day) if region_id not in region_details: continue if severity not in VALID_INCIDENT_SEVERITIES: continue if not (1 <= incident_day <= reference_day): continue if severity == "HIGH": region_stats[region_id]["high_severity_incident_count"] += 1 def calculate_type_average_cpu(profiles, type_cpu_sum, type_usage_count): type_average_cpu = {} for region_type in profiles: count = type_usage_count.get(region_type, 0) if count == 0: type_average_cpu[region_type] = 0 else: type_average_cpu[region_type] = type_cpu_sum.get(region_type, 0) // count return type_average_cpu def calculate_region_risk(stats, max_memory_usage, type_average_cpu): pass def build_output(regions, profiles, region_stats, type_average_cpu): output_regions = [] for region_id, region_name, region_type, input_index in regions: stats = region_stats[region_id] max_cpu, max_mem = profiles[region_type] valid_count = stats["valid_usage_count"] if valid_count == 0: avg_cpu = 0 avg_mem = 0 else: avg_cpu = stats["cpu_sum"] // valid_count avg_mem = stats["memory_sum"] // valid_count active_deployments = stats["active_deployment_count"] cpu_breaches = stats["cpu_breach_count"] mem_breaches = stats["memory_breach_count"] high_incidents = stats["high_severity_incident_count"] type_avg_cpu = type_average_cpu.get(region_type, 0) is_above_cpu_baseline = (valid_count > 0 and avg_cpu > type_avg_cpu) score = 0 if active_deployments < 2: score += 4 if active_deployments == 0: score += 3 if cpu_breaches >= 2: score += 3 if mem_breaches >= 2: score += 3 if high_incidents >= 1: score += 3 if is_above_cpu_baseline: score += 2 if valid_count > 0 and avg_mem > max_mem: score += 2
566 ·

Рядом в ленте

DDeloitte | COGNIZANT | IBM | CAPGEMINIQUANTIPHI ROUND-2 VIBE CODING✅✅ ROUND-1 CLEARED✅ Contact : @MLCODER2DDeloitte | COGNIZANT | IBM | CAPGEMINIFLIPKART 6PM✅ Contact : @MLCODER2
это сообщение
DDeloitte | COGNIZANT | IBM | CAPGEMINIif score >= 10: risk_level = "HIGH" elif score >= 6: risk_level = "MEDIUM" else: risk_level = "LOW" if risk_level in ("HIGH", "DDeloitte | COGNIZANT | IBM | CAPGEMINIWITH connection_usage AS ( SELECT connection_ref, COALESCE(SUM(internet_mb), 0) / 1024.0 AS connection_internet_gb FROM daily_service_consumption WHERE consumpt
DDeloitte | COGNIZANT | IBM | CAPGEMINIDeloitte | COGNIZANT | IBM | CAPGEMINI@python_java_Coding · канал · Технологии
7 178подписчиков560средний охват поста
Лента площадки Открыть в Telegram

Открытая публичная лента из поискового индекса ChatCrawler — «Google по публичному Telegram»; обновляется по мере обхода площадки. Время — UTC.

Только публичный контент, официальный API Telegram. О проекте · Вопросы · Границы индекса · Убрать страницу из выдачи · Каталог · Поиск · Как мы считаем