Sizing definitions
Overview
This document explains the sizing information displayed across CAST Imaging and the SQG dashboards. Sizing information is divided into two categories:
- Application Size
- Measured Size
Each category is explained in the table below:
Criteria | Application Size | Measured Size |
---|---|---|
Definition | Application Size considers the lines of all the files containing code and is considered for the analysis. | Measured Size only considers the lines of the artifacts. An artifact refers to a specific code element such as a function, method, stored procedure, or similar logical construct. |
Line Types Included | All Code lines, comment lines, annotations, constants, imports etc. | Code lines for artifacts only. |
Empty Lines | ❌ Excluded | ❌ Excluded |
Comments | ✅ Included | ❌ Excluded |
Granularity | File-level | Artifact-level |
Use | Determines overall application size. | Determines application technical sizing information for quality grade computation. |
What is Application Size?
Application Size is a basic count of how many lines of code are in your source code files, including comments.
What’s included?
✅
- Programming files such as
.cs
,.java
,.py
,.js
- All lines of code
- Comment lines
What’s not included?
❌
- Empty lines within programming files.
- Non-code files such as
.txt
,.md
,.json
,.xml
,.uax
,.yaml
,.yml
- Test code (e.g., files in
test/
folders) - Temporary or system files such as
.git
,.tmp
,.target
,.github
,.svn
,.eclipse
,.vs
,.vscode
,.idea
,.bin
,.properties
Example
/MyProject
├── src/
│ ├── MainController.cs ✅ Included
│ ├── DatabaseHelper.java ✅ Included
│ ├── script.js ✅ Included
│ ├── info.txt ❌ Not Included
├── test/
│ ├── MainControllerTest.cs ❌ Not Included
├── docs/
│ ├── README.md ❌ Not Included
├── config/
│ ├── settings.json ❌ Not Included
├── .git/ ❌ Not Included
├── tmp/ ❌ Not Included
Where can I see Application Size?
- Application Components tile - Engineering Dashboard:
- Technical tile - Management Dashboard:
What is Measured Size?
Measured Size is derived through focusing only on lines of code from artifacts (e.g., methods, constructors, and class members) that contribute directly to the functional implementation of a software component.
What’s included?
✅
- Artifact code written inside classes, functions, methods, constructors etc. that performs actions during program execution.
- Executable statements (assignments, return statements, etc.)
- Control statements (
if
,for
,while
,switch
, etc.) - Object and data manipulations
- Method calls and assignments
What’s not included?
❌
- File headers
- Empty Lines
import
orusing
statements, namespaces- Package declarations (e.g.,
package com.example
) - Comment lines
Example
using System;// ❌ Excluded (Import/Using statement)
// ❌ Excluded (Empty Line)
namespace Sample // ❌ Excluded (Namespace declaration)
{
public class PaymentDetails // ✅ Included (Class definition)
{
// This is sample code // ❌ Excluded (Comment Line)
const int RecordsPerPage = 10; // ✅ Included (Constant declaration)
IPaymentlisting objIPaymentlisting; // ✅ Included (Field declaration)
public JsonResult CheckStatus(string memberId) // ✅ Included (method)
{
if (string.IsNullOrEmpty(memberId)) // ✅ Included (Control statement - if)
{
return Json("Invalid ID", JsonRequestBehavior.AllowGet); // ✅ Included (Return statement)
}
var status = objIPaymentlisting.GetStatus(memberId); // ✅ Included (Method call + assignment)
return Json(status, JsonRequestBehavior.AllowGet); // ✅ Included (Return statement)
}
}
}
Artifacts considered for Measured Size
This list defines the core code artifacts to be included during parsing, documentation, or static analysis. These represent meaningful logic or structure in a codebase, across most common programming languages.
🔧 Structural Artifacts
- Classes
- Interfaces
- Enums
- Annotations / Attributes
🔁 Executable Artifacts
- Methods
- Functions
- Constructors
- Lambdas / Anonymous Functions
- Procedures
- Stored Procedures
- Triggers
- Static Blocks
🧱 Operational Artifacts
- Constants / Final Variables
- Field / Variable Declarations
- Assignments / Instantiations
- Control Flow Statements (if, switch, for, etc.)
- Try-Catch-Finally Blocks
- Return Statements
🗂️ Data Structure Artifacts
- Database Tables
- Views
- Indexes
- Stored Procedures
Where can I see Measured Size?
- Application Components tile - Engineering Dashboard:
- Technical tile - Management Dashboard:
Example code
The following section takes some example code and provides an explanation of how CAST Imaging counts LOC values for this code using both counting methods. The example code is available as a zip here and contains the following files:
Sample_Code/
Sample_Code/
Program.cs ✅ (Included - C# source code)
README.md ❌ (Excluded - Documentation file)
SampleCode.csproj ❌ (Excluded - Project configuration file)
SampleText.txt ❌ (Excluded - Non-programming text file)
There are a total of 15 lines in Program.cs
(the only file “included” for LOC counts):
1using System;
2using System.Collections.Generic;
3namespace SampleCode
4{
5 public class LinesOfCode
6 {
7 // This is a sample code
8
9 public string LOCDetails()
10 {
11 return "Lines of code for the application";
12
13 }
14 }
15}
Results with Application Size
Using the Application Size LOC count, CAST Imaging will count the following for Program.cs
:
- Included code lines: 12
- Included comment lines: 1
- Excluded empty lines: 2
I.e.:
1using System;
2using System.Collections.Generic;
3namespace SampleCode
4{
5 public class LinesOfCode
6 {
7 // This is a sample code
8 public string LOCDetails()
9 {
10 return "Lines of code for the application";
11 }
12 }
13}
Results with Measured Size
Using the Measured Size LOC count, CAST Imaging will count the following for Program.cs
:
- Included code lines: 7
- Excluded comment lines: 1
- Excluded empty lines excluded: 2
- Excluded
using
statements and namespace declaration: 5
I.e.:
1public class LinesOfCode
2 {
3 public string LOCDetails()
4 {
5 return "Lines of code for the application";
6 }
7 }