Skip to content

Commit 463d254

Browse files
authored
Merge pull request #1081 from Ishavyas9/main
parallel execution of static URLs
2 parents 433f478 + ac36183 commit 463d254

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

docs/smartui-cli.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,6 @@ steps:
252252
smartui capture urls.json --config smartui-web.json
253253
```
254254
255-
256-
257-
258255
### SmartUI CLI Options and Keys
259256
260257
The following are supported `CLI (Command Line Interface)` options for Visual Regression Testing with SmartUI:
@@ -270,6 +267,37 @@ You can see the Smart UI dashboard to view the results. This will help you ident
270267

271268
<img loading="lazy" src={require('../assets/images/smart-visual-testing/smartui-sdk-results-primer.webp').default} alt="cmd" width="768" height="373" className="doc_img"/>
272269

270+
### Parallel execution of static URLs
271+
272+
You can reduce the build time by executing parallel URLs in the following way.
273+
274+
```bash
275+
npx smartui capture urls.json --config .smartui.json --parallel <number-of-parallels> --fetch-results
276+
```
277+
278+
- The `--parallel` flag determines how many URLs will be processed simultaneously
279+
- Each thread captures screenshots independently, maximizing throughput
280+
281+
>**Example:**
282+
>```bash
283+
>npx smartui capture urls.json --config .smartui.json --parallel 3 --fetch-results
284+
>```
285+
286+
#### Determining Optimal Thread Count
287+
The maximum number of parallel threads is calculated using the formula: log<sub>2</sub>(N) where N is the total number of URLs.
288+
289+
>**For example:**
290+
>- For 100 URLs: Maximum parallel threads = log<sub>2</sub>(100) = 6 threads
291+
>- For 50 URLs: Maximum parallel threads = log<sub>2</sub>(50) = 5 threads
292+
>- For 25 URLs: Maximum parallel threads = log<sub>2</sub>(25) = 4 threads
293+
294+
#### Best Practices for parallel execution
295+
296+
- Start with a lower thread count and gradually increase based on your system's performance
297+
- Monitor system resources during execution
298+
- Ensure stable internet connection for reliable parallel processing
299+
300+
273301
For additional information about SmartUI APIs please explore the documentation [here](https://www.lambdatest.com/support/api-doc/)
274302

275303

docs/smartui-sdk-fetch-results.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ SmartUI CLI allows you to fetch detailed build results after executing your visu
6161

6262
## Steps to Use
6363

64-
### *Step 1:* Install SmartUI CLI
64+
### **Step 1:** Install SmartUI CLI
6565

6666
If you haven't already installed SmartUI CLI, install it using npm:
6767

0 commit comments

Comments
 (0)