Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallel execution of static URLs #1081

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions docs/smartui-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@ steps:
smartui capture urls.json --config smartui-web.json
```




### SmartUI CLI Options and Keys

The following are supported `CLI (Command Line Interface)` options for Visual Regression Testing with SmartUI:
Expand All @@ -270,6 +267,37 @@ You can see the Smart UI dashboard to view the results. This will help you ident

<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"/>

### Parallel execution of static URLs

You can reduce the build time by executing parallel URLs in the following way.

```bash
npx smartui capture urls.json --config .smartui.json --parallel <number-of-parallels> --fetch-results
```

- The `--parallel` flag determines how many URLs will be processed simultaneously
- Each thread captures screenshots independently, maximizing throughput

>**Example:**
>```bash
>npx smartui capture urls.json --config .smartui.json --parallel 3 --fetch-results
>```

#### Determining Optimal Thread Count
The maximum number of parallel threads is calculated using the formula: log<sub>2</sub>(N) where N is the total number of URLs.

>**For example:**
>- For 100 URLs: Maximum parallel threads = log<sub>2</sub>(100) = 6 threads
>- For 50 URLs: Maximum parallel threads = log<sub>2</sub>(50) = 5 threads
>- For 25 URLs: Maximum parallel threads = log<sub>2</sub>(25) = 4 threads

#### Best Practices for parallel execution

- Start with a lower thread count and gradually increase based on your system's performance
- Monitor system resources during execution
- Ensure stable internet connection for reliable parallel processing


For additional information about SmartUI APIs please explore the documentation [here](https://www.lambdatest.com/support/api-doc/)


Expand Down
2 changes: 1 addition & 1 deletion docs/smartui-sdk-fetch-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SmartUI CLI allows you to fetch detailed build results after executing your visu

## Steps to Use

### *Step 1:* Install SmartUI CLI
### **Step 1:** Install SmartUI CLI

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

Expand Down
Loading