Skip to content

Schema Definition

This document provides the schema definitions for the JSON and CSV data files generated by the Sbt ScalaMetrics library.

JSON Schema

The JSON data file follows the structure defined in the default metrics-report.json file. See detailed schema here.

CSV Schemas

The CSV data files are structured to provide a flat representation of metrics data. The fileId identifier in each file is helpful for joining the data. Below are the headers names for the generated CSV files:

  • File Level Metrics: metrics-report-files.csv
    projectId,fileId,fileName,filePath,packageName,linesOfCode,fileSizeBytes
    
  • Member Level Metrics: metrics-report-members.csv
    accessModifier,declarationType,fileId,isDeprecated,isNested,linesOfCode,name,parentMember,signature,complexity,hasScaladoc,nestingDepth,byNameParams,defaultedParams,implicitParamLists,implicitParams,paramLists,totalParams,usingParamLists,usingParams,varargParams,explicitDefsValsVars,explicitPublicDefsValsVars,givenConversions,givenInstances,implicitConversions,implicitVals,implicitVars,inlineMethods,inlineParams,inlineVals,inlineVars,avgCasesPerMatch,cases,guards,matches,maxNesting,nestedMatches,wildcards,boolOpsCount,boolOpsPer100,branches,caseCount,catchCaseCount,densityPer100,ifCount,loopCount
    
  • Method Level Metrics: metrics-report-methods.csv
    accessModifier,declarationType,fileId,isDeprecated,isNested,linesOfCode,name,parentMember,signature,complexity,nestingDepth,hasScaladoc,explicitDefsValsVars,explicitPublicDefsValsVars,givenConversions,givenInstances,implicitConversions,implicitVals,implicitVars,inlineMethods,inlineParams,inlineVals,inlineVars,avgCasesPerMatch,cases,guards,matches,maxNesting,nestedMatches,wildcards,boolOpsCount,boolOpsPer100,branches,caseCount,catchCaseCount,densityPer100,ifCount,loopCount