Skip to content

Commit

Permalink
fix(api): change speedtest interval to every 4 hrs
Browse files Browse the repository at this point in the history
this is necessary, because users on a metered connection have noticed high network usage.
Every four hours should still be enough to get a basic view on what is happening.

Also there is a new warning on the install page to warn about this risk.

fixes #253
  • Loading branch information
MauriceNino committed Aug 8, 2022
1 parent 51b7217 commit a04e1f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const CONFIG: Config = {
ram_shown_datapoints: numNull(penv('RAM_SHOWN_DATAPOINTS')) ?? 20,
ram_poll_interval: numNull(penv('RAM_POLL_INTERVAL')) ?? 1000,

speed_test_interval: numNull(penv('SPEED_TEST_INTERVAL')) ?? 60,
speed_test_interval: numNull(penv('SPEED_TEST_INTERVAL')) ?? 60 * 4,
network_widget_grow: numNull(penv('NETWORK_WIDGET_GROW')) ?? 6,
network_widget_min_width: numNull(penv('NETWORK_WIDGET_MIN_WIDTH')) ?? 500,
network_shown_datapoints: numNull(penv('NETWORK_SHOWN_DATAPOINTS')) ?? 20,
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/config/widget-options/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tags:
At which interval the network speed-test should be rerun (in minutes).

- type: `number`
- default: `60`
- default: `240` (every 4 hours)

## `DASHDOT_NETWORK_WIDGET_GROW`

Expand Down
10 changes: 10 additions & 0 deletions apps/docs/docs/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ docker container run -it \

:::

:::warning

The speed testing feature can consume significant amounts of bandwidth, which can pose
problems if your usage is metered (say, by a VPS provider).

Setting the environment variable [`DASHDOT_SPEED_TEST_INTERVAL`](./config/widget-options/network#dashdot_speed_test_interval)
to a higher number can mitigate this concern.

:::

## Installation Options

```mdx-code-block
Expand Down

0 comments on commit a04e1f9

Please sign in to comment.