Data Structure metrics to evaluate effort and time
Some data structure metrics required to evaluate the effort and time needed for developing software are:
- The amount of Data.
- The Usage of data within a component.
- Program weakness.
- The sharing of Data among components.
1. The Amount of Data: There are additional metrics to measure the amount of data which are:
- Number of variables (VARS): The number of variables used in the program is counted in this metric.
- Number of Operands (η2): The number of operands used in the program is counted in this metric.
- η2 = VARS + unique constants + Labels
-
Total number of occurrences of the variable (N2): The total number of occurrences of the variables are computed in this metric.
2. The Usage of data within a Component: The average number of live variables is calculated to compute this metric. A variable is live from its first to its last references within the procedure.
The average number of live variables is the sum of the count of live variables divided by the count of executable statements in a procedure.
For Example, the following equation can calculate the average number of live variables for a program having modules.
Here, LV is the average live variable metric calculated from the ith module.
The equation that gives the average span size for a program of n spans-
3. Program weakness: The weakness of a program depends on its module's weakness. If modules are weak, they tend to be less cohesive, increasing the effort and time metrics required to complete the project.
Module Weakness (WM) = LV* γ, where γ = Average life variables
A program is usually a combination of various modules; hence, program weakness can be a useful measure and is given as:
Here, WMi : Weakness of the ith module, WP: Weakness of the program and m: No. of modules in the program.
4. The Sharing of Data among Modules: A program contains modules and they share modules among each other. The increased data sharing between modules leads to high coupling. Hence, the number of parameters passing between modules also increases. As a result, more effort and time are required to complete the project. So sharing data among modules is a vital metric to calculate effort and time.
Also read V Model in Software Engineering, Introduction to Software Engineering
FAQs
-
What do Data Structure Metrics do?
The Data Structure Metrics captures and calculates the amount of data input to, internally processed in, and output from the software
-
Explain what a live variable is?
A variable can be live from the beginning of its reference to its last in a procedure. A variable is live at a point if it holds a value that may be needed in the future, or equivalently if its value may be read before the next time the variable is written.
-
What is the basic formula to find the LV of a component?
The average number of live variables is the sum of the count of live variables divided by the count of executable statements in a procedure
Key Takeaways
In this article, we have extensively discussed Data Structure Metrics, associated terminologies and implementation, and some questions related to this topic. We hope that this blog has helped you enhance your knowledge and if you wish to learn more, check out our Information Flow Metrics, Coding Ninjas Blog site and visit our Library. You can also consider our Online Coding Courses such as the DSA in Python, C++ DSA Course, DSA in Java Course to give your career an edge over others.
Do upvote our blog to help other ninjas grow.
Happy Learning!