Skip to content

Commit 5d99e56

Browse files
authored
Update generate_sample.py
1 parent 5cd104d commit 5d99e56

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

scripts/generate_sample.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def generate_sample():
1515
total_blocks = 0
1616
hourly_stats = {h: {'allow': 0, 'block': 0} for h in hours_list}
1717

18-
# ダミーロケーションデータ (元のコードのテーブル構造に対応)
18+
# ダミーロケーションデータ
1919
location_data = {
2020
"Home-Network": {"total": 1240, "block": 45, "top_domain": "doubleclick.net"},
2121
"Mobile-VPN": {"total": 580, "block": 12, "top_domain": "analytics.google.com"},
@@ -60,7 +60,7 @@ def generate_sample():
6060
report.append("```")
6161
report.append("> ※ Bar = Allow, Line = Block \n")
6262

63-
# ロケーションInsightsセクション (元のコードのテーブル列を再現)
63+
# ロケーションInsightsセクション
6464
report.append("#### 📍 Location Insights")
6565
report.append("| Location | Total Queries | Blocked | Block Rate | Top Blocked Domain |")
6666
report.append("| :--- | :---: | :---: | :---: | :--- |")
@@ -70,11 +70,24 @@ def generate_sample():
7070
report.append(f"| **{loc}** | {stats['total']:,} | {stats['block']:,} | {l_rate:.1f}% | `{stats['top_domain']}` |")
7171
report.append("\n")
7272

73-
# 全体の上位ブロックドメイン
73+
# 全体の上位ブロックドメイン (10件に拡充)
7474
report.append("#### 🚫 Top 10 Blocked Domains (Global)")
7575
report.append("| Count | Domain |")
7676
report.append("| :--- | :--- |")
77-
dummy_domains = [("doubleclick.net", 42), ("adservice.google.com", 38), ("track.evil-analytics.io", 25)]
77+
78+
dummy_domains = [
79+
("doubleclick.net", 85),
80+
("adservice.google.com", 72),
81+
("track.evil-analytics.io", 54),
82+
("telemetry.api.unity.com", 41),
83+
("secure-pubads.g.doubleclick.net", 38),
84+
("analytics.facebook.com", 31),
85+
("stats.g.doubleclick.net", 25),
86+
("metrics.icloud.com", 19),
87+
("api-global.netflix.com", 12),
88+
("log.optimizely.com", 7)
89+
]
90+
7891
for domain, count in dummy_domains:
7992
report.append(f"| {count:,} | `{domain}` |")
8093

0 commit comments

Comments
 (0)