OASIS Static Analysis Results Interchange Format (SARIF) TC

 View Only
  • 1.  CodeSonar metrics

    Posted 03-01-2022 16:25
      |   view attached
    At the last meeting I promised to share some concrete information about our code metrics.   I’ve attached a PDF that contains the part of our manual that describes the metrics that CodeSonar generates. There are roughly these categories: line counts, complexities (McCabe), token-based measures (Halstead), and a handful of others.   I’ve also harvested some metrics measurements from a few projects. That file is too large to attach, so it can be downloaded from here:   https://download.grammatech.com/metrics-for-sarif.tar.gz user: downloader pw: gtDL8246   This URL will expire in about 60 days.   That file unpacks to a set of .csv files each named after the project from which they were harvested. The columns are: Name – short name for the metric Description – the full name Granularity – one of Analysis, File, or Procedure File – the name of the file (blank if Analysis granularity) Procedure – the name of the procedure (blank if not Procedure granularity) Value – the numeric value of the metric   Some of the metrics in those files are not mentioned in that PDF because they are either generated through a not-quite-official plug-in or are experimental (i.e., me playing around). I can furnish definitions if there is interest.   Of those, the most interesting is ACPATH, which estimates the number of acyclic paths in a procedure. Some of the values are extremely high – there are a few with 31 decimal digits from the Linux kernel, and some are so high that they cannot be expressed as numbers in the CodeSonar database so show up as “inf”.   Enjoy!   -Paul   --- Paul Anderson, VP of Engineering, GrammaTech, Inc. 531 Esty St., Ithaca, NY 14850 Tel: +1 607 273-7340 x118;  https://www.grammatech.com   The information contained in this e-mail and any attachments from GrammaTech, Inc may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments. Attachment: cs-metrics.pdf Description: cs-metrics.pdf

    Attachment(s)

    pdf
    cs-metrics.pdf   1.09 MB 1 version