mirror of
https://github.com/craigerl/aprsd.git
synced 2025-07-28 11:32:24 -04:00
Some cleanup with list plugins
This commit is contained in:
parent
df14eb8f28
commit
5274c5dc56
@ -91,9 +91,7 @@ def _get_installed_aprsd_items():
|
|||||||
plugins = {}
|
plugins = {}
|
||||||
extensions = {}
|
extensions = {}
|
||||||
for finder, name, ispkg in pkgutil.iter_modules():
|
for finder, name, ispkg in pkgutil.iter_modules():
|
||||||
if name.startswith("aprsd_"):
|
if ispkg and name.startswith("aprsd_"):
|
||||||
print(f"Found aprsd_ module: {name}")
|
|
||||||
if ispkg:
|
|
||||||
module = importlib.import_module(name)
|
module = importlib.import_module(name)
|
||||||
pkgs = walk_package(module)
|
pkgs = walk_package(module)
|
||||||
for pkg in pkgs:
|
for pkg in pkgs:
|
||||||
|
@ -113,6 +113,7 @@ class ListenStatsThread(APRSDThread):
|
|||||||
stats_json = collector.Collector().collect()
|
stats_json = collector.Collector().collect()
|
||||||
stats = stats_json["PacketList"]
|
stats = stats_json["PacketList"]
|
||||||
total_rx = stats["rx"]
|
total_rx = stats["rx"]
|
||||||
|
packet_count = len(stats["packets"])
|
||||||
rx_delta = total_rx - self._last_total_rx
|
rx_delta = total_rx - self._last_total_rx
|
||||||
rate = rx_delta / 10
|
rate = rx_delta / 10
|
||||||
|
|
||||||
@ -120,7 +121,8 @@ class ListenStatsThread(APRSDThread):
|
|||||||
LOGU.opt(colors=True).info(
|
LOGU.opt(colors=True).info(
|
||||||
f"<green>RX Rate: {rate} pps</green> "
|
f"<green>RX Rate: {rate} pps</green> "
|
||||||
f"<yellow>Total RX: {total_rx}</yellow> "
|
f"<yellow>Total RX: {total_rx}</yellow> "
|
||||||
f"<red>RX Last 10 secs: {rx_delta}</red>",
|
f"<red>RX Last 10 secs: {rx_delta}</red> "
|
||||||
|
f"<white>Packets in PacketList: {packet_count}</white>",
|
||||||
)
|
)
|
||||||
self._last_total_rx = total_rx
|
self._last_total_rx = total_rx
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user