Dec 2, 2026
How to Measure Software System Complexity (Part 3)
Part three of a series on software complexity: quantifying complexity factors into time, space, and cost vectors, building the weighted model C = T + S + M, and measuring real systems with code examples, evaluation tables, and the Cynefin framework.
1. Background
The previous two articles (Part 1 and Part 2) have discussed the relevant metrics for measuring software complexity in a general sense. However, how to build such models objectively through complex models and output related complexity data requires quantifying different metrics and carefully considering the interrelationships and weights of various complexity factors in real business scenarios. This article will present some analytical thinking and modeling methods to construct a software complexity evaluation model.
Of course, this evaluation model may not be entirely accurate or somewhat rough; further theoretical research is needed for optimization if necessary.
2. List of Complexity Vectors
2.1 Vector Classification
Based on the previous classification, we will divide these vectors into three categories: time, space, and money. We provide some explanations regarding the units of each vector.
2.1.1 Time
Here, we use hours, days, weeks, months, and years as units to measure complexity in terms of time during different software cycles and demand delivery times.
2.1.2 Space
Some complexity factors mentioned earlier may be more broadly defined in terms of space; thus, the measurement units here can include numbers and size metrics.
2.1.3 Money
In terms of cost complexity, our most direct perception is money. If a system’s expected profit can cover its costs, then the investment in this system is worthwhile. Therefore, we use RMB as the basic unit for money, with units of thousands and ten-thousands of yuan.
2.2 Complexity Factors Table
To facilitate statistics and model construction, I have used a table to identify factors influencing software complexity.
Table 1-1: Complexity Factors Table
| Category | Factor (Unit) | Description |
|---|---|---|
| Time Complexity | Demand Collection Time (Days) | Includes the time for demand research and communication. |
| Time Complexity | Document Writing Time for Requirements (Days) | The time from when requirements are relatively certain to be documented, which can be split or combined. |
| Time Complexity | Technical Solution Documentation Writing Time for Requirements (Days) | May also include preliminary technical research and solution discussion; these can be split or combined. |
| Time Complexity | Review Time for Technical Solutions for Requirements (Days/Weeks) | Generally, if multiple rounds of technical reviews are needed due to uncertainty, they should be counted separately. |
| Time Complexity | Software Development Time (Days/Weeks/Months/Years) | |
| Time Complexity | Software Testing Time (Days/Weeks/Months) | The time from development completion to validation. |
| Time Complexity | Software Acceptance Time (Days/Weeks) | |
| Time Complexity | Software Release Time (Days/Weeks) | |
| Time Complexity | Problem Diagnosis Time (Days/Weeks/Months) | This refers to the time spent diagnosing issues within your own system. |
| Time Complexity | Familiarization with Documentation Time (Days/Weeks/Months) | |
| Space Complexity | Number of Systems (Units) | Refers to the number of independently running systems, such as MySQL, standalone microservices, or monolithic services. |
| Space Complexity | Number of System Modules (Units) | Modules may have sub-modules; here, we can measure module numbers based on certain dimensions and try to cover all aspects. |
| Space Complexity | Number of Files in System Modules (Units) | The total number of files involved in the software system’s operation. |
| Space Complexity | Number of Methods in System Modules (Units) | Also includes external APIs. |
| Space Complexity | Number of External Systems Dependent on the System (Units) | |
| Space Complexity | Number of External System Modules Dependent on the System (Units) | |
| Space Complexity | Number of Services Provided by the System to External Systems (Units) | |
| Space Complexity | Number of Times System Interfaces Are Called (Times) | |
| Space Complexity | Number of Machines Required for Software Operation (Units) | |
| Space Complexity | Memory and Disk Space Needed for Storing Software Data (TB/GB/PB) | |
| Space Complexity | Bandwidth Required for Software Services (TB/GB/PB) | |
| Space Complexity | Number of Users Using the Software (People) | |
| Space Complexity | Number of People Involved in Software Development and Operations, Including Product Testing and UI (People) | |
| Space Complexity | Number of Other Technologies or Components Dependent on Software Development and Operation (Units) | Here, we categorize software development and operation dependencies on some lower-level tools as a group; specific situations can be counted separately. |
| Space Complexity | Number of Organizational Departments Involved in Software Development, Operation, and Maintenance (Units) | This involves cross-departmental systems or organizational relationships related to the system, similar to statistical factors under Conway’s Law. |
| Cost Complexity | Human Resource Costs Dependent on Software Development | Here, we only count human-related costs; of course, costs that are loosely or not directly related to complexity are excluded. |
| Cost Complexity | Patent Purchase Costs Dependent on Software Development | |
| Cost Complexity | Specific Software Environment Costs Dependent on Software Development | |
| Cost Complexity | Hardware Costs for Running the Software (Network, Machines, Memory, Disk) | Here, costs can also be broken down separately. |
| Cost Complexity | Adjustment Costs Due to Policy Changes Affecting Requirements | These are relevant in specific industries and scenarios; they may not be included in the analysis. |
2.3 Correlation of Complexity Factors
Some of these complexity factors may overlap or have positive or negative correlations. Therefore, we need to explain some obvious relationships between certain complexity factors and their correlation with complexity itself.
2.3.1 Correlation Between Software Development Time and Number of Developers

2.3.2 Correlation Between Software Development Time and Cost

2.3.3 Other Correlations
Because of space constraints, I will not go through every correlation between complexity factors here. If you are interested, you can assess which other factors have correlations based on your actual situation and add me as a friend and we can discuss it together.
- Correlation Between Software Development Time and Dependent Development Technology Stack.
- Correlation Between Software Release Time and Dependent Release Technology Stack (Tools, Platforms, Middleware, etc.)
2.4 Weighting of Complexity Factors
In reality, complexity factors cannot be calculated in a single dimension; for example, calculating the number of lines of code or methods may introduce some bias to the metrics. Therefore, we can use mathematical vectors or polynomials to reasonably assess the weight of each complexity factor.
When applying weights, there are several points:
- Highlighting certain aspects of complexity: factors with higher weights will be more prominent in overall terms.
- Objective and subjective coexistence: different values for weights may apply at different times and roles; thus, an appropriate evaluation value is needed when setting the weight coefficient.
- The correlation between complex factors also affects their weight coefficients. For example, some indicators have positive or negative correlations, which can be expressed using weight coefficients.
3. Complexity Model
3.1 Building the Model
3.1.1 Model Formula
Here, we use the vector classification mentioned above to formulate the model’s factors in algebraic terms. Assuming:
- Time complexity values represent T (Time)
- Space complexity values represent S (Space)
- Cost complexity values represent M (Money)
Due to the essence of this series being these mathematical formulas, and given our limited expertise, we will use a simple polynomial formula to express different aspects of complexity.
T = X1W1 + X2W2 + X3W3+…..+XnWn. S = Y1W1 + Y2W2 + Y3W3+…..+YnWn. M = Z1W1 + Z2W2 + Z3W3+…..+ZnWn.
Overall complexity can be considered as the sum of these three, and here I use C (Complexity) to represent the value.
Thus, overall complexity can be expressed as C = T + S + M.
3.1.2 Weight Evaluation
The values of X, Y, Z are generally easier to assess, but for W, different people may see software complexity differently during the development phase, so their weight evaluation values will vary. Therefore, some obvious issues that significantly increase software complexity will have higher weights. That is, in certain complex factors, consensus on weight assessment values can be reached. On the other hand, throughout the entire lifecycle from software requirements to delivery, efficiency and software delivery issues will also be measured through weights.
When applying weight assessments, you can reasonably evaluate based on your actual situation and the circumstances of your team; there is not just one answer but a range of possibilities.
3.1.3 Complexity Model Modeling
3.2 Model Input
Here, we simulate calculations for time complexity as follows:
package com.coderman.complexity;
import com.coderman.complexity.enums.ComplexityTypeEnum;
import com.coderman.complexity.enums.TimeComplexityEleTypeEnum;
import com.coderman.complexity.model.CalculateResultBO;
import com.coderman.complexity.model.ComplexityEleBO;
import com.coderman.complexity.model.MeasuringUnitBO;
import com.coderman.complexity.service.CalculateService;
import com.coderman.complexity.service.impl.TimeCalculateServiceImpl;
import java.util.ArrayList;
import java.util.List;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
CalculateService calculateService = new TimeCalculateServiceImpl();
List<ComplexityEleBO> complexityEleBOList = buildTimeComplexityEleBOList();
// Here, we use days as the unit for time-related complexity
CalculateResultBO calculateResultBO = calculateService.calculate(complexityEleBOList, MeasuringUnitBO.getInstanceDay());
System.out.println(calculateResultBO);
}
/**
* Simulate factors of time-related complexity
* @return
*/
private static List<ComplexityEleBO> buildTimeComplexityEleBOList(){
List<ComplexityEleBO> complexityEleBOList = new ArrayList<>();
complexityEleBOList.add(new ComplexityEleBO(ComplexityTypeEnum.TIME.getCode(), TimeComplexityEleTypeEnum.REQUIREMENT_COLLECTION,
1.0d,2.0d,MeasuringUnitBO.getInstanceDay()));
complexityEleBOList.add(new ComplexityEleBO(ComplexityTypeEnum.TIME.getCode(),
TimeComplexityEleTypeEnum.REQUIREMENT_DEVELOP,1.5d,8.0d,MeasuringUnitBO.getInstanceDay()));
complexityEleBOList.add(new ComplexityEleBO(ComplexityTypeEnum.TIME.getCode(),
TimeComplexityEleTypeEnum.REQUIREMENT_DEVELOP_TEST,1d,2.0d,MeasuringUnitBO.getInstanceDay()));
return complexityEleBOList;
}
}
3.3 Model Output
The model’s output is relatively simple; it only outputs the measuring unit of complexity, the type of complexity, and the value of complexity.
4. Measuring Systems
Here, we will use some practical examples to see how to calculate complexity values based on the above complexity model. To conveniently extract complexity information, we slightly adjust the table as follows:
| Category | Factor (Unit) | Complexity Value (Range) | Weight Value (Range) | Calculated Result of Complexity Factors (Range) | Description |
|---|---|---|---|---|---|
| Time Complexity | Demand Collection Time (Days) | Includes the time for demand research and communication. | |||
| Time Complexity | Document Writing Time for Requirements (Days) | The time from when requirements are relatively certain to be documented, which can be split or combined. | |||
| Time Complexity | Technical Solution Documentation Writing Time for Requirements (Days) | May also include preliminary technical research and solution discussion; these can be split or combined. | |||
| Time Complexity | Review Time for Technical Solutions for Requirements (Days/Weeks) | Generally, if multiple rounds of technical reviews are needed due to uncertainty, they should be counted separately. | |||
| Time Complexity | Software Development Time (Days/Weeks/Months/Years) | ||||
| Time Complexity | Software Testing Time (Days/Weeks/Months) | The time from development completion to validation. | |||
| Time Complexity | Software Acceptance Time (Days/Weeks) | ||||
| Time Complexity | Software Release Time (Days/Weeks) | ||||
| Time Complexity | Problem Diagnosis Time (Days/Weeks/Months) | This refers to the time spent diagnosing issues within your own system. | |||
| Time Complexity | Familiarization with Documentation Time (Days/Weeks/Months) | ||||
| Space Complexity | Number of Systems (Units) | Refers to the number of independently running systems, such as MySQL, standalone microservices, or monolithic services. | |||
| Space Complexity | Number of System Modules (Units) | Modules may have sub-modules; here, we can measure module numbers based on certain dimensions and try to cover all aspects. | |||
| Space Complexity | Number of Files in System Modules (Units) | The total number of files involved in the software system’s operation. | |||
| Space Complexity | Number of Methods in System Modules (Units) | Also includes external APIs. | |||
| Space Complexity | Number of External Systems Dependent on the System (Units) | ||||
| Space Complexity | Number of External System Modules Dependent on the System (Units) | ||||
| Space Complexity | Number of Services Provided by the System to External Systems (Units) | ||||
| Space Complexity | Number of Times System Interfaces Are Called (Times) | ||||
| Space Complexity | Number of Machines Required for Software Operation (Units) | ||||
| Space Complexity | Memory and Disk Space Needed for Storing Software Data (TB/GB/PB) | ||||
| Space Complexity | Bandwidth Required for Software Services (TB/GB/PB) | ||||
| Space Complexity | Number of Users Using the Software (People) | ||||
| Space Complexity | Number of People Involved in Software Development and Operations, Including Product Testing and UI (People) | ||||
| Space Complexity | Number of Other Technologies or Components Dependent on Software Development and Operation (Units) | Here, we categorize software development and operation dependencies on some lower-level tools as a group; specific situations can be counted separately. | |||
| Space Complexity | Number of Organizational Departments Involved in Software Development, Operation, and Maintenance (Units) | This involves cross-departmental systems or organizational relationships related to the system, similar to statistical factors under Conway’s Law. | |||
| Cost Complexity | Human Resource Costs Dependent on Software Development | Here, we only count human-related costs; of course, costs that are loosely or not directly related to complexity are excluded. | |||
| Cost Complexity | Patent Purchase Costs Dependent on Software Development | ||||
| Cost Complexity | Specific Software Environment Costs Dependent on Software Development | ||||
| Cost Complexity | Hardware Costs for Running the Software (Network, Machines, Memory, Disk) | Here, costs can also be broken down separately. | |||
| Cost Complexity | Adjustment Costs Due to Policy Changes Affecting Requirements | These are relevant in specific industries and scenarios; they may not be included in the analysis. |
Here, we add three columns that allow for easy calculation of a system’s complexity using the above formula. Of course, the calculated complexity result can also fall within a range, so computer programs still need to calculate the range of the complexity result.
4.1 Single Component-Level Systems
We consider single component-level systems as independently running Java processes or microservice instances, or large monolithic services. Therefore, the content to be filled in the table would be simpler but should still be comprehensive from a technical and human perspective.
4.2 Distributed Service-Level Systems
Here, we are measuring distributed microservices or cluster-level systems, such as product systems or marketing discount systems. These systems are generally managed by one team, so the system boundaries align with the team’s boundaries, also fitting Conway’s Law. Defining the system scope will define the number of systems and the range of development personnel. However, it is important to assess changes in personnel and dynamic planning of service resources; therefore, a reasonable and realistic assessment should be made.
4.3 Monolithic Integrated Systems
These refer to systems that appear as one on the surface but consist of many sub-systems combined into an executable exe or jar package, or installation files. Typically, this mode is different from my microservice applications, but complexity can still be assessed.
5. Systems Related to Complexity
5.1 Engineering Efficiency Platform
Many companies use engineering efficiency platforms or develop and maintain their own. The reason for doing so is not only to assist in recording various information, tracking projects, but also to help improve software development efficiency and delivery capabilities. Engineering efficiency platforms involve many aspects, and I personally think they are an extension of DevOps. In such a platform, different roles can better manage the complexity within their scope.
Of course, whether it supports the software development lifecycle well needs continuous optimization and improvement by those who develop the tool platform. Most often, bought engineering efficiency platforms may not fit the company’s actual situation very well.
5.2 Development Efficiency Platform
Development efficiency platforms are similar to or just have different names from engineering efficiency platforms, but they cover a broader range of business lines and scenarios. They also include many statistical features, such as combining Jira or Confluence document functions. However, development personnel may resist or feel resistant psychologically towards these platforms. This will be discussed in more detail in later articles.
Speaking of it, how is the relationship between development efficiency and complexity? Because development efficiency focuses on statistics and measurement, we can say that development efficiency is a simple way to measure complexity. It just doesn’t cover all scenarios; some scenarios have very little representation in development efficiency but cannot fully measure system complexity.
5.3 Agile Frameworks and Methodologies
Different people focus on different aspects of software complexity and development efficiency. Therefore, while measuring complexity may not be particularly important, there are numerous methods to address and control it. Here, we will briefly introduce some theoretical approaches from agile frameworks and methodologies.
5.3.1 Agile Development Methodologies
- Scrum
- XP (Extreme Programming)
- Lean Development
- …
5.3.2 Cynefin Framework
Here is a diagram of the Cynefin framework:

Official link: https://thecynefin.co/.
Overall, it categorizes complexity factors based on different dimensions, making them easier for humans to understand and manage.
6. Frequently Monitored System Complexity
Some of the above complexity dimensions are theoretical. As developers, we look at system complexity from several aspects in internet architecture here, which I will briefly introduce.
6.0 Mind Map

6.1 Code Complexity
Code complexity is not visible during the requirements design phase; it may have some reflection in the solution stage. Here, the focus is on the development phase, and various factors affecting overall complexity include module design, interface design, implementation chains, etc.
6.2 Organizational Complexity
From a manager’s perspective, organizational complexity also needs to be considered, especially in internet industries where organizational changes are frequent. Such changes can bring dynamic fluctuations in system complexity.
6.3 Architectural Complexity
Internet technology is now relatively stable, and distributed applications have been developing for many years. I think we may have reached a bottleneck. In the early days of development, there might be some code copying possibilities, but architectural guidance was not always available. However, nowadays, many large companies are exploring new architectures.
6.4 Related Articles on Engineering Efficiency and Software Complexity
How to Cope with Complexity: https://mp.weixin.qq.com/s/8YD9sqTuZGJEpVZPYY-aBQ
System Dilemmas and Software Complexity: https://mp.weixin.qq.com/s/npTzzZiJ_pvbXgFOTGmZ0Q
Core Methods and Practices for Measuring Development Efficiency Series Articles: https://www.infoq.cn/article/kINcaQBBC0uyvFmVlvzx
7. Conclusion
Throughout the measurement process, we can obtain some desired information. Although the result may not be important, using the above complexity model still helps us find ways to address complexity.
Comments
Comments are powered by GitHub Discussions. Sign in with GitHub to join the discussion.