mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-23 07:34:31 -06:00
re-add relevancy metrics back to metrics view
This commit is contained in:
parent
212067d22d
commit
f6569ba841
@ -19,6 +19,7 @@ package io.nosqlbench.api.engine.metrics.wrappers;
|
|||||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||||
import io.nosqlbench.api.labels.NBLabels;
|
import io.nosqlbench.api.labels.NBLabels;
|
||||||
import io.nosqlbench.api.engine.metrics.DoubleSummaryGauge;
|
import io.nosqlbench.api.engine.metrics.DoubleSummaryGauge;
|
||||||
|
import io.nosqlbench.components.NBComponent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -26,25 +27,25 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class RelevancyMeasures implements NBLabeledElement {
|
public class RelevancyMeasures implements NBLabeledElement {
|
||||||
|
|
||||||
private final NBLabeledElement parent;
|
private final NBComponent parent;
|
||||||
private final NBLabels labels;
|
private final NBLabels labels;
|
||||||
private final List<RelevancyFunction> functions = new ArrayList<>();
|
private final List<RelevancyFunction> functions = new ArrayList<>();
|
||||||
private final List<DoubleSummaryGauge> gauges = new ArrayList<>();
|
private final List<DoubleSummaryGauge> gauges = new ArrayList<>();
|
||||||
|
|
||||||
public RelevancyMeasures(NBLabeledElement parent) {
|
public RelevancyMeasures(NBComponent parent) {
|
||||||
this(parent,NBLabels.forKV());
|
this(parent,NBLabels.forKV());
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelevancyMeasures(NBLabeledElement parent, NBLabels labels) {
|
public RelevancyMeasures(NBComponent parent, NBLabels labels) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.labels = labels;
|
this.labels = labels;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelevancyMeasures(NBLabeledElement parent, Object... labels) {
|
public RelevancyMeasures(NBComponent parent, Object... labels) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.labels = NBLabels.forKV(labels);
|
this.labels = NBLabels.forKV(labels);
|
||||||
}
|
}
|
||||||
public RelevancyMeasures(NBLabeledElement parent, Map<String,String> labels) {
|
public RelevancyMeasures(NBComponent parent, Map<String,String> labels) {
|
||||||
this(parent,NBLabels.forMap(labels));
|
this(parent,NBLabels.forMap(labels));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,8 +58,8 @@ public class RelevancyMeasures implements NBLabeledElement {
|
|||||||
for (RelevancyFunction function : f) {
|
for (RelevancyFunction function : f) {
|
||||||
this.functions.add(function);
|
this.functions.add(function);
|
||||||
function.prependLabels(this);
|
function.prependLabels(this);
|
||||||
// DoubleSummaryGauge gauge = ActivityMetrics.summaryGauge(function, function.getUniqueName());
|
DoubleSummaryGauge gauge = parent.create().summaryGauge(function.getUniqueName(),DoubleSummaryGauge.Stat.Average.toString());
|
||||||
// this.gauges.add(gauge);
|
this.gauges.add(gauge);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user