Download presentation
Presentation is loading. Please wait.
Published byMerryl Dixon Modified over 6 years ago
1
Simple metrics to assess code quantity and quality
Oliver Holme CMS ECAL DCS Group
2
How big is my (sub-)project?
Easy measurements Files DPs FSM object or object types Very basic indication of size svnplot provides a bit of information too Number of files, average file size...
3
Lines of code (LOC) LOC How to determine LOC? Two languages
Good indicator of required maintenance load LOC measure can be physical or logical Logical LOC counts the number of executable statements Logical analysis is harder and must be language aware How to determine LOC? Two languages CONTROL SML
4
Where is the code? Code may not be stored in these locations...
Tool to strip code from panels and DPL files Tool to count code, whitespace and comments Panels Scripts & Libs DPL files (FSM object types) .postInstall .pnl .dpl .ctl
5
Extracting panel code Advantage Disadvantage
.pnl .xml CONTROL code only PVSS00ui Custom Tool Advantage XML panel code is as seen in GEDI In XML panel " is shown as " In PNL files " is shown as \" Disadvantage Some panels do not automatically convert to XML Submitted to ICE Support
6
Extracting FSM code Extract code from DPL files
Search for _FwFsmObjectType DPs CONTROL code from DU types (.components) SML code from CU/LU types (.actions and .states) Restore code formatting as seen in FSM tools FSM SML code only .dpl Custom Tool FSM CONTROLcode only
7
Counting the code Counting is not really language aware
Compromise between physical and logical LOC Scripts & Libs Panel CONTROL code HTML Report Custom Tool FSM SML code FSM CONTROLcode
8
Quality assessment Investigated ConQAT
Continuous Quality Assessment Toolkit Multi-lingual or C++ modes work with CONTROL Nice presentation of results Explored some metrics so far Code duplication Code : Comment ratio Block length Nested block depth Run from WinCC OA Run manually (in Eclipse)
9
ConQAT Configuration ConQAT Config File
10
Integration of ConQAT WinCC OA Tool to configure and execute ConQAT
Can take raw panels or stripped code from panels ConQAT Config File Custom Tool Custom Tool ConQAT .pnl .postInstall Stripped panel code .ctl HTML Reports
11
Current status Standard Output ConQAT Examples
12
Summary WinCC OA Tool counts lines of CONTROL & SML
Reasonable accuracy in counting May be fooled sometimes by /* or */ in literal strings Integration of ConQAT into WinCC OA Configuration and execution Only used to analyse CONTROL Presentation of WinCC OA and ConQAT results in HTML Requires no installation of components Can analyse code taken directly from SVN
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.