docs: document NATIVE_SPEEDTEST_PATH config option

- Added details for NATIVE_SPEEDTEST_PATH to the README under 'Usage'.
- Explained default behavior and included examples for overriding the binary location.
- Added a verbose log to print the binary path when the plugin starts up.
This commit is contained in:
Amir
2025-12-29 19:23:31 -03:00
parent 7edf85718b
commit 218c427552
2 changed files with 11 additions and 0 deletions

View File

@@ -8,6 +8,16 @@ This plugin supports two engines:
1. **Baseline Engine**: Uses the Python `speedtest-cli` library (default).
2. **Native Engine (Optimized)**: Uses the official native Ookla Speedtest binary.
#### Native Speedtest Path
The plugin looks for the Speedtest binary at `/usr/bin/speedtest` by default. If the binary is located elsewhere, you can configure the path using the `NATIVE_SPEEDTEST_PATH` environment variable:
Example:
```env
NATIVE_SPEEDTEST_PATH=/custom/path/to/speedtest
```
If this variable is left unset, the plugin assumes `/usr/bin/speedtest`.
#### Opt-in for Native Engine
To use the native engine, you must provide the official binary to the container. The native binary is **strongly recommended** for internet connections > 100 Mbps to ensure CPU bottlenecks don't affect your results.

View File

@@ -50,6 +50,7 @@ def main():
def run_speedtest():
native_path = NATIVE_SPEEDTEST_PATH
mylog('verbose', [f"[INTRSPD] Using native binary path: {native_path}"])
if os.path.exists(native_path):
mylog('verbose', ["[INTRSPD] Native speedtest binary detected, using it."])
try: