Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jan 29, 2026
1 parent 68d17d7 commit 78ce389
Showing 1 changed file with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,23 @@ def analyze():
print(f"Total Resources: {len(resource_tags)} | Fully Compliant: {len(resource_tags)-len(non_compliant)}")
print(f"Compliance Rate: {((len(resource_tags)-len(non_compliant))/len(resource_tags)*100):.2f}%")

# --- SECTION 5: LEGACY M
# --- SECTION 5: LEGACY MAPPING ---
if legacy_map:
print(f"\n{div}\nSECTION 5: LEGACY MIGRATION STATUS\n{div}")
pending = 0
for arn, tags in resource_tags.items():
for leg, targ in legacy_map.items():
if leg in tags and targ not in tags: pending += 1
print(f"Pending Migration Tasks (Legacy Key exists, New Key missing): {pending}")

# --- SECTION 6: SERVICE DISTRIBUTION ---
print(f"\n{div}\nSECTION 6: SERVICE DISTRIBUTION\n{div}")
print(f"{'Service Prefix':<20} | {'Friendly Name':<40} | {'Count'}")
for svc, count in sorted(svc_final_counts.items(), key=lambda x: x[1], reverse=True):
print(f"{svc:<20} | {service_map.get(svc, 'Unknown').ljust(40)} | {count}")

mem_mb = round(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1024, 2)
print(f"\n{div}\nPeak Memory Usage: {mem_mb} MB\n{div}")

if __name__ == "__main__":
analyze()

0 comments on commit 78ce389

Please sign in to comment.