Skip to content

config package

dosse91 edited this page Sep 25, 2019 · 3 revisions
SpeedtestConfig class

Stores the configuration for the speedtest, and provides some constants used throughout the application.

Constructors:

To instantiate with the default configuration (recommended):

public SpeedtestConfig()

To instantiate with custom settings:

public SpeedtestConfig(int dl_ckSize, int ul_ckSize, int dl_parallelStreams, int ul_parallelStreams, int dl_streamDelay, int ul_streamDelay, double dl_graceTime, double ul_graceTime, int dl_connectTimeout, int dl_soTimeout, int ul_connectTimeout, int ul_soTimeout, int ping_connectTimeout, int ping_soTimeout, int dl_recvBuffer, int dl_sendBuffer, int ul_recvBuffer, int ul_sendBuffer, int ping_recvBuffer, int ping_sendBuffer, String errorHandlingMode, int time_dl_max, int time_ul_max, boolean time_auto, int count_ping, String telemetry_extra, double overheadCompensationFactor, boolean getIP_isp, String getIP_distance, boolean useMebibits, String test_order)

A description for each of these arguments is provided in the Advanced configuration section.

SpeedtestConfig can also be instantiated from a JSON object with the same fields.

Getters and setters for all of the settings are provided. Validity checks are performed every time a setting is changed.

Public constants:

  • Erorr handling:
    • ONERROR_FAIL: "fail"
    • ONERROR_ATTEMPT_RESTART: "attempt-restart"
    • ONERROR_MUST_RESTART: "must-restart"
  • Distance measurement
    • DISTANCE_NO: "no"
    • DISTANCE_KM: "km"
    • DISTANCE_MILES: "mi"

Methods:

  • clone(): generates a clone of this object
TelemetryConfig class

Stores the configuration for the telemetry, and provides some constants used throughout the application.

Constructors:

To instantiate with the default settings (telemetry disabled):

public TelemetryConfig()

To instantiate with custom settings:

public TelemetryConfig(String telemetryLevel, String server, String path, String shareURL)

A description for each of these arguments is provided in the Telemetry and results sharing section.

TelemetryConfig can also be instantiated from a JSON object with the same fields.

Getters are provided for all of the settings.

Methods:

  • clone(): generates a clone of this object
Clone this wiki locally