1. Help Center
  2. Metrics & Definitions

Batch size

Batch size measures how much work is bundled up in a change. Swarmia offers tools for evaluating pull request batch size by looking at the total number of changes in a single pull request.


Batch size is calculated by the lines of code changed in a given pull request. This number excludes certain automatically generated files, because generated files can completely render "raw" batch insights useless.


In Swarmia, the chart that shows the pull request size vs cycle time shows a set of pull requests in the selected time frame and charts them based on their individual cycle time and the total number of lines of code changed in the pull request. This chart allows you to see correlations between the size of a pull request and its cycle time. 

Why it matters

Splitting work in small increments is a great way to improve delivery.

Small pull requests are easier to plan, review, and deploy.

We suggest to keep pull request size under 500 lines of code, and pay attention to work that ends up spanning over 1,000+ lines.

How to use it

Seeing the distribution of larger batch sizes and higher cycle times can be a great indicator that your team needs to focus on delivery smaller batch sizes. This change will not only improve your cycle time, but your quality as well. 

Where to find it

You can find batch size metrics under Insights → Code → Batch size.