28.13. LanguageFileMetrics

28.13.1. Description

LanguageFileMetrics reduction function computes a collection of telemetry streams representing project size information, one telemetry stream for each type of programming language found in the project.

28.13.2. Parameter

Table 28.12. 

ParameterDescriptionDefault
sizeMetricsNameThe size metrics name. This is a value that corresponds to the actual metrics name in your 'FileMetric' sensor data, such as 'totalLines', 'classCount', 'functionCount', 'commentLines', 'numFiles'.totalLines
filePatternAnt-like file pattern specifying the files to be included in computation.**

28.13.3. Example

Example 28.18. LanguageFilemetric

streams LanguageFileMetricStream() = {
   "LOC by Programming Language",
   LanguageFileMetric("totalLines", "**")
};

y-axis yAxis(label) = {label};

chart LanguageFileMetricChart() = {
   "LOC by Programming Language",
  (LanguageFileMetricStream(), yAxis("LOC"))
};

draw LanguageFileMetricChart();

This chart shows the number of source lines by programming language detected in the project.