Subject: [netmod] how to interpret complexity score of YANG dump

From: "Tissa Senevirathne (tsenevir)" <[email-masked]>
Date: Sat, 19 Apr 2014 15:53:58 +0000

Hi

I am using ynagdump (http://www.netconfcentral.org/run_yangdump) utility to pass YANG models. Under statistics it gives a complexity score. Below I have cut and pasted complexity of ietf-routing.yang.

Questions:

1.       How does the complexity score derived

2.       Assuming higher the number more complex, how can one reduce it ? in other word what contributes more to the complexity score?

3.       Is there any guidelines on recommended complexity level of a YANG module

Ietf-routing,yang statistics

Statistics:
Complexity score: 2576
Total Nodes: 134
Extensions: 0
Features: 2
..

Thanks
Tissa

---

From: Andy Bierman <[email-masked]>
Date: Sat, 19 Apr 2014 12:13:44 -0700

On Sat, Apr 19, 2014 at 8:53 AM, Tissa Senevirathne (tsenevir) <
[email-masked]> wrote:

>  Hi
>
>
> I am using ynagdump (http://www.netconfcentral.org/run_yangdump) utility
> to pass YANG models. Under statistics it gives a complexity score. Below I
> have cut and pasted complexity of ietf-routing.yang.
>
>
>
> Questions:
>
>
>
> 2.       Assuming higher the number more complex, how can one reduce it ?
> in other word what contributes more to the complexity score?
>

This is some code I wrote back in 2010.
I don't remember all the details, but the code is still the same in
the OpenYuma code (look in yangstats.c and yangstats.h).

The idea was to come up with a metric to estimate implementation complexity
and readability complexity.  I never tried to tune the weight factors so
they
correlated to any measured data (so they are probably wrong).

Andy

> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
>
>