Commit f5e13526 authored by Alexandre's avatar Alexandre
Browse files

Rename option --silent into --no-display-results

parent bbeaed93
......@@ -143,7 +143,7 @@ For example :
```
In order to focus on the time per request, you can suppress the
output by using the option `--silent`.
output by using the option `--no-display-results`.
This option only works with `--multistreams`.
Two modes are available. By default each response is read,
......@@ -158,7 +158,7 @@ This is based on [libcurl time values](https://curl.haxx.se/libcurl/c/curl_easy_
and [CURLINFO_PRETRANSFER_TIME](https://curl.haxx.se/libcurl/c/curl_easy_getinfo.html#CURLINFOPRETRANSFERTIME)
```
% ./homer.py --multistreams --file input_file --repeat 5 --silent --time https://doh.powerdns.org
% ./homer.py --multistreams --file input_file --repeat 5 --no-display-results --time https://doh.powerdns.org
0 36.165 ms 44.773 ms 8.608 ms
1 0.142 ms 8.580 ms 8.438 ms
3 0.095 ms 9.223 ms 9.128 ms
......
......@@ -54,7 +54,7 @@ forceIPv6 = False
connectTo = None
multistreams = False
sync = False
silent = False
display_results = True
show_time = False
check = False
mandatory_level = None
......@@ -591,7 +591,7 @@ class ConnectionDoH(Connection):
print(f'{handle.pretime * 1000:8.3f} ms', end=' ')
print(f'{handle.time * 1000:8.3f} ms', end=' ')
print(f'{(handle.time - handle.pretime) * 1000:8.3f} ms')
if not silent:
if display_results:
print("Return code %s (%.2f ms):" % (handle.request.rcode,
(handle.time - handle.pretime) * 1000))
print(f"{handle.request.response}\n")
......@@ -838,7 +838,7 @@ if not monitoring:
optlist, args = getopt.getopt (sys.argv[1:], "hvPkeV:r:f:d:t46",
["help", "verbose", "dot", "head",
"insecure", "POST", "vhost=", "multistreams",
"sync", "silent", "time",
"sync", "no-display-results", "time",
"dnssec", "noedns", "ecs", "repeat=", "file=", "delay=",
"key=", "nosni",
"v4only", "v6only",
......@@ -863,8 +863,8 @@ if not monitoring:
multistreams = True
elif option == "--sync":
sync = True
elif option == "--silent":
silent = True
elif option == "--no-display-results":
display_results = False
elif option == "--time":
show_time = True
elif option == "--dnssec":
......@@ -923,8 +923,8 @@ if not monitoring:
if sync and not multistreams:
usage("--sync cannot be used without --multistreams")
sys.exit(1)
if silent and not multistreams:
usage("--silent cannot be used without --multistreams")
if display_results and not multistreams:
usage("--no-display-results cannot be used without --multistreams")
sys.exit(1)
if show_time and not multistreams:
usage("--time cannot be used without --multistreams")
......@@ -1089,7 +1089,7 @@ for connectTo in ip_set:
input = open(ifile)
if not check:
for i in range (0, tests):
if tests > 1 and (verbose or not silent):
if tests > 1 and (verbose or display_results):
print("\nTest %i" % i)
if ifile is not None:
name, rtype = get_next_domain(input)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment