Metric-StabilityIndex¶
Measures the stability of components based on their fan-in and fan-out values
Required inputs: RFG
Stability Index
Measures the ratio of fan-in to the sum of fan-in and fan-out for the chosen
node_types_to_consider in a lifted view of hierarchy_view_name
with base_view_name.
Only edges of types listed in
edge_types_to_consider are used as "dependencies" for the calculation.
Formula
Stability Index = Fan-In / (Fan-In + Fan-Out) = 1 - Fan-Out / (Fan-In + Fan-Out)
Interpretation
- 1.0 - Node has only incoming dependencies (fan-in). Maximally stable.
- 0.0 - Node has only outgoing dependencies (fan-out). Maximally volatile.
This metric helps identify components that are more stable (higher index) versus those that are more volatile (lower index) in terms of their dependencies.
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: exclude_messages_in_system_headers, excludes, includes, justification_checker, post_processing, provider, severity
This rule shares the following common metric options: base_view_name, excluded_node_types, hierarchy_edge_name, hierarchy_view_name, propagate, report_all_values, report_propagated_values
The following places define options that affect this rule: Analysis-GlobalOptions
display_name¶
display_name : str | None = None
edge_types_to_consider¶
edge_types_to_consider : set[str] = {'Static_Call'}
base_view_name) to
consider as dependencies for the stability calculation.
max_value¶
max_value : float | None = None
min_value¶
min_value : float | None = None
node_types_to_consider¶
node_types_to_consider : set[str] = {'Module'}
hierarchy_view_name)
to calculate the stability index for.
Please note that node types that are hierarchically nested are not supported in
node_types_to_consider.
rfg_metric_name¶
rfg_metric_name : str = 'Metric.StabilityIndex'