Skip to content

Commit c2af01b

Browse files
authored
Update Readme (#46)
* Update Readme main.go Formatting README.md Formatting and update of Parameters added in the meantime. --no-icmp, --local-json, --duration, --chunks, --upload-size, --skip-cert-verify * Update README.md syntax
1 parent df77b3e commit c2af01b

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ GLOBAL OPTIONS:
116116
--ipv6, -6 Force IPv6 only (default: false)
117117
--no-download Do not perform download test (default: false)
118118
--no-upload Do not perform upload test (default: false)
119+
--no-icmp Do not use ICMP ping. ICMP doesn't work well under Linux
120+
at this moment, so you might want to disable it (default: false)
119121
--concurrent value Concurrent HTTP requests being made (default: 3)
120122
--bytes Display values in bytes instead of bits. Does not affect
121123
the image generated by --share, nor output from
@@ -126,27 +128,32 @@ GLOBAL OPTIONS:
126128
--share Generate and provide a URL to the LibreSpeed.org share results
127129
image, not displayed with --csv (default: false)
128130
--simple Suppress verbose output, only show basic information
129-
(default: false)
131+
(default: false)
130132
--csv Suppress verbose output, only show basic information in CSV
131133
format. Speeds listed in bit/s and not affected by --bytes
132-
(default: false)
134+
(default: false)
133135
--csv-delimiter CSV_DELIMITER Single character delimiter (CSV_DELIMITER) to use in
134136
CSV output. (default: ",")
135137
--csv-header Print CSV headers (default: false)
136138
--json Suppress verbose output, only show basic information
137139
in JSON format. Speeds listed in bit/s and not
138-
affected by --bytes (default: false)
140+
affected by --bytes (default: false)
139141
--list Display a list of LibreSpeed.org servers (default: false)
140142
--server SERVER Specify a SERVER ID to test against. Can be supplied
141143
multiple times. Cannot be used with --exclude
142144
--exclude EXCLUDE EXCLUDE a server from selection. Can be supplied
143145
multiple times. Cannot be used with --server
144146
--server-json value Use an alternative server list from remote JSON file
145-
--local-json value Use an alternative server list from local JSON file
147+
--local-json value Use an alternative server list from local JSON file,
148+
or read from stdin with "--local-json -".
146149
--source SOURCE SOURCE IP address to bind to
147150
--timeout TIMEOUT HTTP TIMEOUT in seconds. (default: 15)
151+
--duration value Upload and download test duration in seconds (default: 15)
152+
--chunks value Chunks to download from server, chunk size depends on server configuration (default: 100)
153+
--upload-size value Size of payload being uploaded in KiB (default: 1024)
148154
--secure Use HTTPS instead of HTTP when communicating with
149155
LibreSpeed.org operated servers (default: false)
156+
--skip-cert-verify Skip verifying SSL certificate for HTTPS connections (self-signed certs) (default: false)
150157
--no-pre-allocate Do not pre allocate upload data. Pre allocation is
151158
enabled by default to improve upload performance. To
152159
support systems with insufficient memory, use this
@@ -190,6 +197,10 @@ locally via `--local-json`). The format is as below:
190197
]
191198
```
192199
200+
The `--local-json` option can also read from `stdin`:
201+
202+
`echo '[{"id": 1,"name": "a","server": "https://speedtest.example.com/","dlURL": "garbage.php","ulURL": "empty.php","pingURL": "empty.php","getIpURL": "getIP.php"}]' | librespeed-cli --local-json - `
203+
193204
As you can see in the example, all servers have their schemes defined. In case of undefined scheme (e.g. `//example.com`),
194205
`librespeed-cli` will use `http` by default, or `https` when the `--secure` option is enabled.
195206

main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func main() {
5959
&cli.BoolFlag{
6060
Name: defs.OptionNoICMP,
6161
Usage: "Do not use ICMP ping. ICMP doesn't work well under Linux\n" +
62-
"at this moment, so you might want to disable it",
62+
"\tat this moment, so you might want to disable it",
6363
},
6464
&cli.IntFlag{
6565
Name: defs.OptionConcurrent,
@@ -110,7 +110,7 @@ func main() {
110110
Name: defs.OptionJSON,
111111
Usage: "Suppress verbose output, only show basic information\n" +
112112
"\tin JSON format. Speeds listed in bit/s and not\n" +
113-
"\t affected by --bytes",
113+
"\taffected by --bytes",
114114
},
115115
&cli.BoolFlag{
116116
Name: defs.OptionList,
@@ -141,7 +141,7 @@ func main() {
141141
},
142142
&cli.IntFlag{
143143
Name: defs.OptionTimeout,
144-
Usage: "HTTP `TIMEOUT` in seconds",
144+
Usage: "HTTP `TIMEOUT` in seconds.",
145145
Value: 15,
146146
},
147147
&cli.IntFlag{

0 commit comments

Comments
 (0)