mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-13 05:31:28 -07:00
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:
@@ -8,6 +8,16 @@ This plugin supports two engines:
|
|||||||
1. **Baseline Engine**: Uses the Python `speedtest-cli` library (default).
|
1. **Baseline Engine**: Uses the Python `speedtest-cli` library (default).
|
||||||
2. **Native Engine (Optimized)**: Uses the official native Ookla Speedtest binary.
|
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
|
#### 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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ def main():
|
|||||||
|
|
||||||
def run_speedtest():
|
def run_speedtest():
|
||||||
native_path = NATIVE_SPEEDTEST_PATH
|
native_path = NATIVE_SPEEDTEST_PATH
|
||||||
|
mylog('verbose', [f"[INTRSPD] Using native binary path: {native_path}"])
|
||||||
if os.path.exists(native_path):
|
if os.path.exists(native_path):
|
||||||
mylog('verbose', ["[INTRSPD] Native speedtest binary detected, using it."])
|
mylog('verbose', ["[INTRSPD] Native speedtest binary detected, using it."])
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user