# Improving Bitbucket Push Performance

Avo Assure Client introduces an enhanced Bitbucket push mechanism that uses parallel processing to handle large volumes of test artifacts efficiently. It splits Test cases across multiple threads instead of processing them one by one.&#x20;

This improvement significantly speeds up the push operation and reduces execution time from several minutes to a few seconds. It improves overall performance, minimizes waiting time, and provides a smoother experience when working with large projects in Avo Assure.&#x20;

## About the Source Control Management Parameters

The Source Control Management (SCM) configuration parameters can be increased or decreased based on project requirements and system capability. The optimal values depend on your local systems processor speed, available RAM, and network stability. Adjust these parameters as per requirement to balance performance, reliability, and resource usage.&#x20;

{% hint style="info" %}
**Note**: &#x20;

* Source Control Management (SCM) parameter values are set by default based on your system's performance capacity, available RAM, and network stability.&#x20;
* Configure these Source Control Management (SCM) parameters based on your systems performance capacity and the size of your project.&#x20;
  {% endhint %}

The following SCM configuration parameters help improve the push method:

1. scm\_export\_worker\_count
   * The **scm\_export\_worker\_count** parameter defines how many parallel threads Avo Assure Client uses to push test artifacts to the Bitbucket repository. Each thread processes a portion of the Test cases at the same time, instead of running them one after another. When you increase or decrease the worker count, Avo Assure Client distributes the workload accordingly to improve the processing speed and reduces the overall push time. The system sets the **scm\_export\_worker\_count** value to 20.&#x20;
   * Example:
     * Suppose you need to push 1000 Test cases to the Bitbucket Repository.&#x20;
       * You set the **scm\_export\_worker\_count** to 10.&#x20;
         * **Avo Assure Client** creates 10 parallel threads.&#x20;
         * Each thread processes 25 Test cases at a time.&#x20;
         * All 10 threads run together and push 250 Test cases per cycle.&#x20;
         * As the cycles repeat, Avo Assure Client pushes all 1,000 Test cases much faster than a single thread process.&#x20;
         * This parallel approach reduces the push time and makes the process faster than using a single thread.
2. scm\_export\_max\_retries
   * The **scm\_export\_max\_retries** parameter defines how many times **Avo Assure Client** retries an SCM API call when the call fails due to temporary issues such as server load or network instability. The system sets the **scm\_export\_max\_retries** value to 5.
   * Example:
     * Suppose **scm\_export\_max\_retries** is set to 5.&#x20;
       * Avo Assure Client sends an SCM API request.&#x20;
       * The API call fails due to a temporary server delay.
       * Avo Assure Client retries the same API call up to 5 times.
     * If the API call succeeds within these attempts, the push process continues.&#x20;
     * If all retry attempts fail, Avo Assure Client stops the operation and reports the failure.
3. scm\_export\_backoff\_base
   * The **scm\_export\_backoff\_base** parameter defines how long Avo Assure Client waits before retrying an API call after a failure. This waiting time increases gradually with each retry. This increasing delay is called exponential backoff, and it prevents the server from being overloaded with repeated requests. You set this value based on network stability and the server’s response capacity. The system sets the **scm\_export\_backoff\_base** value to 0.5.&#x20;
   * Example:
     * Suppose the **scm\_export\_backoff\_base** value is 0.5 seconds.&#x20;
       * Avo Assure Client waits 0.5s, then 1s, then 2s, 4s, and 8s for each retry attempt.&#x20;
     * If you increase the base value to 1 second&#x20;
       * Avo Assure Client waits 1s, 2s, 4s, 8s, and 16s between retries.&#x20;
       * When the network is slow or the server takes time to respond, increasing this value gives the system more time to recover before the next retry.&#x20;
4. scm\_export\_chunk\_size&#x20;
   * The **scm\_export\_chunk\_size** parameter defines how many test artifacts Avo Assure Client groups together in one API call. Each group is called a chunk. Smaller chunks create many small and quick API calls. Larger chunks reduce the number of calls but increase data size per call. You set this value based on project size, system performance, and network stability. The system sets the **scm\_export\_chunk\_size** value to 25.&#x20;
   * Example:
     * Suppose the chunk size is 25.&#x20;
       * Avo Assure Client fetches 25 items per API call.&#x20;
       * A project with 1000 Test cases requires 40 API calls.&#x20;
     * If you increase the chunk size to 50&#x20;
       * Avo Assure Client fetches 50 items per API call.&#x20;
       * The same project needs only 20 API calls, but each call is heavier and requires strong network performance.&#x20;
     * If you decrease the chunk size to 10&#x20;
       * Avo Assure Client makes 100 API calls, and each call is very quick, which helps when network interruptions occur frequently.&#x20;

<figure><img src="/files/yINHsA9anRGFZdreDgco" alt=""><figcaption></figcaption></figure>

## Editing Source Control Management Parameters

To edit the Source Control Management (SCM) configuration in Avo Assure Client to speed up push performance, perform the following actions:

1. From the local system, select the location of Avo Assure Client.&#x20;
2. From the Avo Assure Client location, select the **Avo** folder.&#x20;

<figure><img src="/files/3NCaklRV9qgnB4nxDg70" alt=""><figcaption></figcaption></figure>

3. From the **Avo** folder, select the **AvoAssure** folder.

<figure><img src="/files/cjP5ijvsuD8hnLPhNq5p" alt=""><figcaption></figcaption></figure>

4. On the **AvoAssure** folder, select the **assets** folder.

<figure><img src="/files/6ntQR7iPta5zl0PQ83gZ" alt=""><figcaption></figcaption></figure>

5. Under the **assets** folder, select the **config.json** file.

<figure><img src="/files/YWrG6bpRBrq3ZiEpnIVQ" alt=""><figcaption></figcaption></figure>

6. From the dialog box, select the required application to open the **config.json** file.&#x20;
7. From the dialog box, select **Always** or **Just once**.&#x20;

{% hint style="info" %}
**Note**: &#x20;

* In this scenario, **Notepad** is selected as the application to open the selected **config.json** file.
* You can use any application on your system that supports JSON files to open and view the **config.json** file.
  {% endhint %}

<figure><img src="/files/jFWScJRs2DLNfyW5e4tb" alt=""><figcaption></figcaption></figure>

8. Open the **config.Json** file in **Notepad** and select the Source Control Management (SCM) parameter to edit.
9. Select the **scm\_export\_worker\_count** parameter and change the value based on your system capacity.

{% hint style="info" %}
**Note**: You can increase or decrease the worker count depending on your system's processor and RAM.
{% endhint %}

10. Select the **scm\_export\_max\_retries** parameter and update the value as needed.&#x20;

{% hint style="info" %}
**Note**: This parameter defines how many times Avo Assure Client retries an Source Control Management (SCM) API call if it fails due to temporary issues.&#x20;
{% endhint %}

11. Select the **scm\_export\_backoff\_base** parameter and modify the value if required.&#x20;

{% hint style="info" %}
**Note**: This parameter defines the base wait duration (in milliseconds) before retrying a failed Source Control Management (SCM) API call.&#x20;
{% endhint %}

12. Select the **scm\_export\_chunk\_size** parameter and update the value according to your performance requirements.&#x20;

{% hint style="info" %}
**Note**: This parameter defines how many Test cases are grouped together in each API push operation.&#x20;
{% endhint %}

13. After editing the required configuration, press **Ctrl + S** to save the changes.&#x20;

<figure><img src="/files/O2ENBHrjv8No7a75HHxn" alt=""><figcaption></figcaption></figure>

### Example

* Suppose you need to push 1,000 Test cases to the Bitbucket repository.
  * Without Source Control Management (SCM) configuration, Avo Assure Client pushes Test cases sequentially, which takes a long time.
* After configuring SCM parameters
  * Set the SCM export worker count to 10, creating 10 parallel threads.
  * Set the chunk size to 25, so each thread processes 25 Test cases at a time.
  * When all 10 threads run together, Avo Assure Client pushes 250 Test cases in one cycle.
  * To push all 1,000 Test cases, the system completes 4 cycles.
  * You can increase or decrease the worker count based on your system’s processor and RAM to achieve optimal performance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/integrations-in-avo-assure/versioning/bitbucket/setting-up-bitbucket-in-avo-assure/copy-of-pushing-data-to-bitbucket-repository/improving-bitbucket-push-performance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
