---
title: "Calculator Configuration"
canonical: "https://docs.getxray.app/space/XRAY/330268741/Calculator%20Configuration"
format: markdown
---
> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> > Macro (toc)

# Overview

The **Calculator Configuration** screen allows administrators to fine-tune how Xray processes calculation events related to the **TestRunStatus** and **Requirement Status** custom fields. These calculations are triggered by actions such as importing Test results or editing Issues.

This configuration is crucial for optimizing performance in Continuous Integration (CI/CD) environments, especially in high-volume or parallel Test scenarios.

### **Purpose of the Calculator**

The calculator service processes events from a queue to compute and update key status fields. Each event typically corresponds to a test-related operation. For example, importing results for 1000 tests will generate 1000 events. Efficient handling of these events ensures that project status indicators stay accurate and up to date.

# Operations

## Access

From the [Administration & Configuration settings](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301501144).

## Configuration** **

![Figure 1 - Configuration](media://9f969346-d5e9-4153-b3e4-e148b48786e7)

### Calculator Frequency

Defines how often the calculator service runs (Figure 1 - 1).

**Options:**

- Every minute.
- Every 2 minutes.
- Every 3 minutes.
- Every 5 minutes.

### **Chunk Size**

Specifies the number of events to be fetched from the queue each time the calculator runs (Figure 1 - 2).

**Options:**

- 1000.
- 5000.
- 10000.
- 20000.

**Default value:** 1000.

### **Thread Pool Size**

Maximum number of threads that can simultaneously calculate chunks of events extracted from the queue (Figure 1 - 3).

**Details:**

- Minimum: 1.
- Maximum: depends on the available resources (processors and database connections).

> ℹ️ This setting defines the number of concurrent threads Xray can use to process calculations for *TestRunStatus* and *Requirement Status* fields (in the Xray Global Admin Settings). It helps balance processing speed and resource usage.

## **How it Works – Example**

Given the configuration depicted in Figure 1 - 4:

- Calculator frequency: every minute.
- Chunk size: 10000.
- Thread pool size: 16.

> ℹ️ Every minute, up to 10000 events are picked by one of the available threads. If all threads are busy, the extracted events wait until a thread is free.

This screen (Figure 1) is key for:

- Controlling how frequently test coverage calculations are updated.
- Managing performance and system resource usage.


> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> If you have questions or technical issues, please [contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28) or [send us a message using the in-app chat](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301501383).