Just output metrics in the order declared
All checks were successful
Tests / Clang total: 1533, passed: 1533
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Debug total: 1531, passed: 1531
Tests / SIMD fallback total: 1533, passed: 1533
Tests / Release [gcc] total: 1533, passed: 1533
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 1144, passed: 1144
Tests / Coverage total: 1151, passed: 1151
Code Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 98.71% (1677/1699) * Branch Coverage: 64.55% (1504/2330) * Complexity Density: 0.00 * Lines of Code: 1699 #### Quality Gates Summary Output truncated.
weaselab/conflict-set/pipeline/head This commit looks good

This commit is contained in:
2024-07-12 16:10:28 -07:00
parent cecfcc0da7
commit ed274c24d7
4 changed files with 4 additions and 14 deletions

View File

@@ -3264,17 +3264,13 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
int metricsCount = 0;
void initMetrics() {
metrics = (MetricsV1 *)safe_malloc(metricsCount * sizeof(metrics[0]));
for (auto [i, m] = std::make_tuple(0, metricList); i < metricsCount;
++i, m = m->prev) {
for (auto [i, m] = std::make_tuple(metricsCount - 1, metricList); i >= 0;
--i, m = m->prev) {
metrics[i].name = m->name;
metrics[i].help = m->help;
metrics[i].p = m;
metrics[i].type = m->type;
}
std::sort(metrics, metrics + metricsCount,
[](const MetricsV1 &lhs, const MetricsV1 &rhs) -> bool {
return std::string_view(lhs.name) < std::string_view(rhs.name);
});
}
Metric *metricList = nullptr;