Skip to content

Commit

Permalink
Expose experimental --parallel / --jobs options.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcamiel committed Apr 16, 2024
1 parent 9123abb commit 2feb8d7
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ will follow a redirection only for the second entry.
| <a href="#interactive" id="interactive"><code>--interactive</code></a> | Stop between requests.<br><br>This is similar to a break point, You can then continue (Press C) or quit (Press Q).<br><br>This is a cli-only option.<br> |
| <a href="#ipv4" id="ipv4"><code>-4, --ipv4</code></a> | This option tells Hurl to use IPv4 addresses only when resolving host names, and not for example try IPv6.<br> |
| <a href="#ipv6" id="ipv6"><code>-6, --ipv6</code></a> | This option tells Hurl to use IPv6 addresses only when resolving host names, and not for example try IPv4.<br> |
| <a href="#jobs" id="jobs"><code>--jobs &lt;NUM&gt;</code></a> | (Experimental) Maximum number of parallel jobs in parallel mode. Default value corresponds (in most cases) to the<br>current amount of CPUs.<br><br>See also [`--parallel`](#parallel).<br><br>This is a cli-only option.<br> |
| <a href="#json" id="json"><code>--json</code></a> | Output each Hurl file result to JSON. The format is very closed to HAR format.<br><br>This is a cli-only option.<br> |
| <a href="#key" id="key"><code>--key &lt;KEY&gt;</code></a> | Private key file name.<br> |
| <a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. To limit the amount of redirects to follow use the [`--max-redirs`](#max-redirs) option<br> |
Expand All @@ -1212,6 +1213,7 @@ will follow a redirection only for the second entry.
| <a href="#no-output" id="no-output"><code>--no-output</code></a> | Suppress output. By default, Hurl outputs the body of the last response.<br><br>This is a cli-only option.<br> |
| <a href="#noproxy" id="noproxy"><code>--noproxy &lt;HOST(S)&gt;</code></a> | Comma-separated list of hosts which do not use a proxy.<br><br>Override value from Environment variable no_proxy.<br> |
| <a href="#output" id="output"><code>-o, --output &lt;FILE&gt;</code></a> | Write output to FILE instead of stdout.<br> |
| <a href="#parallel" id="parallel"><code>--parallel</code></a> | (Experimental) Run files in parallel.<br><br>Each Hurl file is executed in its own worker thread, without sharing anything with the other workers. The default run mode is sequential.<br><br>See also [`--max-workers`](#max-workers).<br><br>This is a cli-only option.<br> |
| <a href="#path-as-is" id="path-as-is"><code>--path-as-is</code></a> | Tell Hurl to not handle sequences of /../ or /./ in the given URL path. Normally Hurl will squash or merge them according to standards but with this option set you tell it not to do that.<br> |
| <a href="#proxy" id="proxy"><code>-x, --proxy &lt;[PROTOCOL://]HOST[:PORT]&gt;</code></a> | Use the specified proxy.<br> |
| <a href="#report-html" id="report-html"><code>--report-html &lt;DIR&gt;</code></a> | Generate HTML report in DIR.<br><br>If the HTML report already exists, it will be updated with the new test results.<br><br>This is a cli-only option.<br> |
Expand Down
2 changes: 2 additions & 0 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ will follow a redirection only for the second entry.
| <a href="#interactive" id="interactive"><code>--interactive</code></a> | Stop between requests.<br><br>This is similar to a break point, You can then continue (Press C) or quit (Press Q).<br><br>This is a cli-only option.<br> |
| <a href="#ipv4" id="ipv4"><code>-4, --ipv4</code></a> | This option tells Hurl to use IPv4 addresses only when resolving host names, and not for example try IPv6.<br> |
| <a href="#ipv6" id="ipv6"><code>-6, --ipv6</code></a> | This option tells Hurl to use IPv6 addresses only when resolving host names, and not for example try IPv4.<br> |
| <a href="#jobs" id="jobs"><code>--jobs &lt;NUM&gt;</code></a> | (Experimental) Maximum number of parallel jobs in parallel mode. Default value corresponds (in most cases) to the<br>current amount of CPUs.<br><br>See also [`--parallel`](#parallel).<br><br>This is a cli-only option.<br> |
| <a href="#json" id="json"><code>--json</code></a> | Output each Hurl file result to JSON. The format is very closed to HAR format.<br><br>This is a cli-only option.<br> |
| <a href="#key" id="key"><code>--key &lt;KEY&gt;</code></a> | Private key file name.<br> |
| <a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. To limit the amount of redirects to follow use the [`--max-redirs`](#max-redirs) option<br> |
Expand All @@ -187,6 +188,7 @@ will follow a redirection only for the second entry.
| <a href="#no-output" id="no-output"><code>--no-output</code></a> | Suppress output. By default, Hurl outputs the body of the last response.<br><br>This is a cli-only option.<br> |
| <a href="#noproxy" id="noproxy"><code>--noproxy &lt;HOST(S)&gt;</code></a> | Comma-separated list of hosts which do not use a proxy.<br><br>Override value from Environment variable no_proxy.<br> |
| <a href="#output" id="output"><code>-o, --output &lt;FILE&gt;</code></a> | Write output to FILE instead of stdout.<br> |
| <a href="#parallel" id="parallel"><code>--parallel</code></a> | (Experimental) Run files in parallel.<br><br>Each Hurl file is executed in its own worker thread, without sharing anything with the other workers. The default run mode is sequential.<br><br>See also [`--max-workers`](#max-workers).<br><br>This is a cli-only option.<br> |
| <a href="#path-as-is" id="path-as-is"><code>--path-as-is</code></a> | Tell Hurl to not handle sequences of /../ or /./ in the given URL path. Normally Hurl will squash or merge them according to standards but with this option set you tell it not to do that.<br> |
| <a href="#proxy" id="proxy"><code>-x, --proxy &lt;[PROTOCOL://]HOST[:PORT]&gt;</code></a> | Use the specified proxy.<br> |
| <a href="#report-html" id="report-html"><code>--report-html &lt;DIR&gt;</code></a> | Generate HTML report in DIR.<br><br>If the HTML report already exists, it will be updated with the new test results.<br><br>This is a cli-only option.<br> |
Expand Down
21 changes: 20 additions & 1 deletion docs/manual/hurl.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hurl 1 "15 Apr 2024" "hurl 4.3.0-SNAPSHOT" " Hurl Manual"
.TH hurl 1 "16 Apr 2024" "hurl 4.3.0-SNAPSHOT" " Hurl Manual"
.SH NAME

hurl - run and test HTTP requests.
Expand Down Expand Up @@ -276,6 +276,15 @@ This option tells Hurl to use IPv4 addresses only when resolving host names, and

This option tells Hurl to use IPv6 addresses only when resolving host names, and not for example try IPv4.

.IP "--jobs <NUM> "

(Experimental) Maximum number of parallel jobs in parallel mode. Default value corresponds (in most cases) to the
current amount of CPUs.

See also \fI--parallel\fP.

This is a cli-only option.

.IP "--json "

Output each Hurl file result to JSON. The format is very closed to HAR format.
Expand Down Expand Up @@ -355,6 +364,16 @@ Override value from Environment variable no_proxy.

Write output to FILE instead of stdout.

.IP "--parallel "

(Experimental) Run files in parallel.

Each Hurl file is executed in its own worker thread, without sharing anything with the other workers. The default run mode is sequential.

See also \fI--max-workers\fP.

This is a cli-only option.

.IP "--path-as-is "

Tell Hurl to not handle sequences of /../ or /./ in the given URL path. Normally Hurl will squash or merge them according to standards but with this option set you tell it not to do that.
Expand Down
19 changes: 19 additions & 0 deletions docs/manual/hurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ This option tells Hurl to use IPv4 addresses only when resolving host names, and

This option tells Hurl to use IPv6 addresses only when resolving host names, and not for example try IPv4.

### --jobs <NUM> {#jobs}

(Experimental) Maximum number of parallel jobs in parallel mode. Default value corresponds (in most cases) to the
current amount of CPUs.

See also [`--parallel`](#parallel).

This is a cli-only option.

### --json {#json}

Output each Hurl file result to JSON. The format is very closed to HAR format.
Expand Down Expand Up @@ -374,6 +383,16 @@ Override value from Environment variable no_proxy.

Write output to FILE instead of stdout.

### --parallel {#parallel}

(Experimental) Run files in parallel.

Each Hurl file is executed in its own worker thread, without sharing anything with the other workers. The default run mode is sequential.

See also [`--max-workers`](#max-workers).

This is a cli-only option.

### --path-as-is {#path-as-is}

Tell Hurl to not handle sequences of /../ or /./ in the given URL path. Normally Hurl will squash or merge them according to standards but with this option set you tell it not to do that.
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/hurlfmt.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hurl 1 "15 Apr 2024" "hurl 4.3.0-SNAPSHOT" " Hurl Manual"
.TH hurl 1 "16 Apr 2024" "hurl 4.3.0-SNAPSHOT" " Hurl Manual"
.SH NAME

hurlfmt - format Hurl files
Expand Down
1 change: 0 additions & 1 deletion docs/spec/options/hurl/jobs.option
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ value: NUM
value_parser: clap::value_parser!(u32).range(1..)
help: (Experimental) Maximum number of parallel jobs
cli_only: true
experimental: true
---
(Experimental) Maximum number of parallel jobs in parallel mode. Default value corresponds (in most cases) to the
current amount of CPUs.
Expand Down
1 change: 0 additions & 1 deletion docs/spec/options/hurl/parallel.option
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: parallel
long: parallel
help: (Experimental) Run files in parallel
cli_only: true
experimental: true
---
(Experimental) Run files in parallel.

Expand Down
4 changes: 4 additions & 0 deletions integration/hurl/tests_ok/help.out.pattern
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Options:
-6, --ipv6
Tell Hurl to use IPv6 addresses only when resolving host names, and not for example try
IPv4
--jobs <NUM>
(Experimental) Maximum number of parallel jobs
--json
Output each Hurl file result to JSON
--max-filesize <BYTES>
Expand All @@ -87,6 +89,8 @@ Options:
List of hosts which do not use proxy
-o, --output <FILE>
Write to FILE instead of stdout
--parallel
(Experimental) Run files in parallel
--path-as-is
Tell Hurl to not handle sequences of /../ or /./ in the given URL path
-x, --proxy <[PROTOCOL://]HOST[:PORT]>
Expand Down
Loading

0 comments on commit 2feb8d7

Please sign in to comment.