From 292eaf8a154089945621d47bb6adb668b3a1e99d Mon Sep 17 00:00:00 2001 From: wzdnzd Date: Fri, 7 Jun 2024 15:58:08 +0800 Subject: [PATCH] output check result statistics --- subscribe/process.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subscribe/process.py b/subscribe/process.py index 40ddf1a49..77f86bc4f 100644 --- a/subscribe/process.py +++ b/subscribe/process.py @@ -494,6 +494,9 @@ def aggregate(args: argparse.Namespace) -> None: availables = [checks[i] for i in range(len(checks)) if masks[i]] nochecks.extend(availables) + dead = len(checks) - len(availables) + logger.info(f"proxies check finished, total: {len(checks)}, alive: {len(availables)}, dead: {dead}") + for item in nochecks: item.pop("sub", "") @@ -567,7 +570,7 @@ def aggregate(args: argparse.Namespace) -> None: utils.write_file(filename=filename, lines=content) cost = "{:.2f}s".format(time.time() - starttime) - logger.info(f"proxies check finished, group: {k}\tcount: {len(nochecks)}, cost: {cost}") + logger.info(f"group [{k}] process finished, count: {len(nochecks)}, cost: {cost}") config = { "domains": sites,