The page describes the computation of the metric grade at application level. Computation need to be done on the Central Database.
Figure 1
This computation can be useful when comparing two snapshot results or when the metric grade at system/application/module level is not as expected (0, 4 or any other).
Release | Yes/No |
---|---|
8.3.x | |
8.2.x | |
8.1.x | |
8.0.x | |
7.3.x | |
7.2.x | |
7.0.x |
RDBMS | Yes/No |
---|---|
Oracle Server | |
Microsoft SQL Server | |
CSS2 | |
CSS1 |
- Check that the Consolidation mode is used. This can be viewed in Expert mode in the CAST Management Studio > Assessment Model editor, under Quality Model > Consolidation Settings:
Figure 2
For more information on various consolidation modes see the documentation here: Defining consolidation settings - Select from the below list depending on what is selected in Cast-MS Assessment Model -
Full Application
The grade is calculated without any impact of modules by summing up the impact of the technical criteria associated with the business criteria.
Formula -
the metric grade at application level = SUM (<WEIGHT_OF_TECHNICAL_CRITERION>*<METRIC_GRADE_OF_EACH_TECHNICAL_CRITERION at Application Level>)/SUM(<WEIGHT_OF_EACH_TECHNICAL_CRITERIA>)
Example -
Figure 3
Here we are computing the grade of Documentation Business Criteria -
Sum (grade of each technical criteria * weight) / Sum (weight) = (2.71*1 + 3.01*1 + 4*1 + 4*1)/(1 + 1 + 1 + 1) = 13.72/4 = 3.43
When there are critical metrics involved :
When you have some critical metrics involved in the grade calculation then you need to take the minimum grade among those critical metrics grade and from the result of above formula.
For example:
From above screenshot, let's calculate the grade of TC-Programming Practices - Error and Exception Handling. There are 4 critical rules here with grade 1,1,1.95,2.81
=Min( ( (SUM (<WEIGHT_OF_QR>*<GRADE_OF_EACH_QR>)/SUM(<WEIGHT_OF_EACH_QR>)/SUM(<WEIGHT_OF_EACH_QR>),1,1,1.95,2.81)
=Min((8*1+8*1+7*1+8*1.21+7*1.95+6*2.81+7*3.12+8*3.21+8*4)/67),1,1,1.95,2.81)
=Min(2.13,1,1,1.95,2.81)
=1 ( Min value of above list of values)
Average of Modules
The grade at application level is calculated with the impact of all modules taking a simple average of grades of the metric at module level.
Formula -
the metric grade at application level = SUM(<METRIC_GRADE_OF_EACH_MODULE>)/NUMBER_OF_MODULES
Example -
In the below screenshot we are calculating grade for Quality Rule - Avoid Open SQL Queries in Loops
Figure 4
Figure 5
the metric grade at application level = (1+1+1)/3 = 1
For business criteria and Technical criteria - Get the grades at module level from the Investigation Quality Model Drill down view of dashboard by clicking on each module displayed in the drop down box situated at the left top of the dashboard.
Average of Modules (weighted by Business Value)
Formula -
the metric grade at application level = SUM (<WEIGHT_OF_MODULE>*<METRIC_GRADE_OF_EACH_MODULE>)/SUM(<WEIGHT_OF_ALL_MODULES>)
WEIGHT_OF_MODULE
Get the ID of the metric used for module weight using following query to be executed on central database -
ExampleSELECT OPTION_VALUE FROM SYS_SITE_OPTIONS WHERE OPTION_NAME = 'ADG_CENTRAL_WEIGHT_METRIC'
Result - 10152 .
It means the metric bearing the ID 10152 is used as aggregation WeightGet values of weight per module by running the below query on central database -
ExampleSELECT dmr.metric_num_value AS "WEIGHT", ap.object_id AS "MODULE_ID", ap.object_name AS "APP_NAME", dmr.snapshot_id AS "SNAPSHOT_ID" FROM dss_objects AP, dss_metric_results DMR, dss_links DL WHERE dmr.metric_id = <weight_metric_id> AND dmr.metric_value_index = 1 AND dmr.object_id = ap.object_id AND dl.previous_object_id = <application_id> AND dl.next_object_id = ap.object_id AND ap.object_type_id = 20000 AND dl.link_type_id = 1
Use this page to get the APPLICATION_ID - SQL Queries - CAST Central Base - Queries on applications - How to get the ID of the application.
Example -
ExampleSELECT DMR.metric_num_value AS "WEIGHT", AP.object_id AS "MODULE_ID", AP.object_name AS "APP_NAME", DMR.snapshot_id AS "SNAPSHOT_ID" FROM dss_objects AP, dss_metric_results DMR, dss_links DL WHERE DMR.metric_id = 10152 AND DMR.metric_value_index = 1 AND DMR.object_id = AP.object_id AND DL.previous_object_id = 3 AND DL.next_object_id = AP.object_id AND AP.object_type_id = 20000 AND DL.link_type_id = 1 Result - WEIGHT;MODULE_ID;APP_NAME;SNAPSHOT_ID 2;52251;"RECIPE BL";1 4;52252;"RECIPE COMMON";1 2;52253;"RECIPE DAL";1 1;52254;"RECIPE DATABASE";1 4;52255;"RECIPE MODEL";1 1;52256;"RECIPE SECURITY";1 4;52257;"RECIPE WEB";1
METRIC_GRADE_OF_EACH_MODULE
Get the grades at module level from the Investigation Quality Model Drill down view of dashboard by clicking on each module displayed in the drop down box situated at the left top of the dashboard.
Figure 6
Calculation Example -
Weight from query | Module Name | Grade From Dashboard |
---|---|---|
2 | RECIPE BL | 2 |
4 | RECIPE COMMON | 1 |
2 | RECIPE DAL | 1 |
1 | RECIPE DATABASE | 1 |
4 | RECIPE MODEL | 3 |
1 | RECIPE SECURITY | 2 |
4 | RECIPE WEB | 2 |
SUM (<WEIGHT_OF_MODULE>*<METRIC_GRADE_OF_EACH_MODULE>)/SUM(<WEIGHT_OF_ALL_MODULES>)
(2*2)+(4*1)+(2*1)+(1*1)+(4*3)+(1*2)+(4*2) / (2+4+2+1+4+1+4) = 1.83