C++: Limit metrics to top 500

This commit is contained in:
Calum Grant
2024-11-08 14:37:59 +00:00
parent 067ecdeea0
commit faeff396eb
4 changed files with 11 additions and 0 deletions

View File

@@ -60,6 +60,14 @@ class QualityMetric extends Metric {
}
}
signature class RankedMetric extends Metric {
int getValue();
}
module RankMetric<RankedMetric M> {
int getRank(M s) { s = rank[result](M m | | m order by m.getValue() desc) }
}
/** Various metrics we want to report. */
module CppMetrics {
class CompilationUnits extends BaseMetric {