LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Node count for SLOC estimate from .lvproj

Hi,

I am trying to get an estimate of SLOC for my project manager. Using the node count is good enough for our purposes. I am using LabVIEW 8.5. I want to use Tools->Profile->VI Metrics. However, our project has over 1200 VIs and everything is handled through a .lvproj. It would be nice if I could just select the Tools->Profile->VI Metrics setting from the .lvproj but this is greyed out. Is there any way to get a node count on my entire project easily or do I have to select the VI Metrics from all 1200 VIs? If this is the case, would I be correct in assuming that I should then do a count of the nodes from the actual name of the VI and not the total, so as to not count subVI's nodes twice as there are many that are called from multiple VIs(example: VI_Name.vi # of nodes, as opposed to -total- # of nodes)?

 

Thank you,

Roger Pennington

0 Kudos
Message 1 of 5
(3,863 Views)

I think you just open your main VI?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 5
(3,847 Views)

I suppose that you have tried explaining to your project manager that SLOC is totally meaningless -- even for languages that have lines of code, which LV does not.

 

But even making the "translation" to number of nodes, the number is still meaningless. It assumes that a lower number is always better. But I guess bean counters that don't know how to actually do the work, have to have something to count.

 

So how 'bout 50400 -- that's 1200 * 42. It's a perfectly fine number and as valid as any other you might generate.

 

Mike...

 

PS: Where are your people from? I have some Penningtons in my family tree.


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 5
(3,815 Views)

If you run this count from a top level VI (main.vi), it will tell you the nodes contained in all the subVIs it calls as well (at least in LV2014, I do not have LV8.5 installed on my computer). I think this would be the best method to figure out how many nodes are in the entire project assuming all of your code is called from the main.vi.

 

 

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,798 Views)
Be careful as this method doesn't catch dynamically dispatched VIs or VIs launched dynamically from a path. It would is better to use what Darren suggests in the last post on this thread:

http://forums.ni.com/t5/LabVIEW/Programmatic-VI-Metric-Node-Count/td-p/1042729

And that is to use VI Analyzer. There is even API to automated it. But because you can select a top-level VI or Folder, you have a better chance of catching everything.
Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 5 of 5
(3,586 Views)