mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
quick fix for missing labels in measures
This commit is contained in:
@@ -71,11 +71,8 @@ blocks:
|
|||||||
insert: |
|
insert: |
|
||||||
INSERT INTO TEMPLATE(keyspace,baselines).TEMPLATE(table,vectors)
|
INSERT INTO TEMPLATE(keyspace,baselines).TEMPLATE(table,vectors)
|
||||||
(key, value) VALUES ({id},{train_floatlist});
|
(key, value) VALUES ({id},{train_floatlist});
|
||||||
# await_index:
|
|
||||||
# ops:
|
|
||||||
search_and_index:
|
search_and_index:
|
||||||
ops:
|
ops:
|
||||||
select_ann_limit_borked:
|
|
||||||
select_ann_limit:
|
select_ann_limit:
|
||||||
prepared: |
|
prepared: |
|
||||||
SELECT * FROM TEMPLATE(keyspace,baselines).TEMPLATE(table,vectors)
|
SELECT * FROM TEMPLATE(keyspace,baselines).TEMPLATE(table,vectors)
|
||||||
|
|||||||
@@ -16,12 +16,13 @@
|
|||||||
|
|
||||||
package io.nosqlbench.engine.extensions.computefunctions.relavency;
|
package io.nosqlbench.engine.extensions.computefunctions.relavency;
|
||||||
|
|
||||||
|
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||||
import io.nosqlbench.api.labels.NBLabels;
|
import io.nosqlbench.api.labels.NBLabels;
|
||||||
import io.nosqlbench.api.engine.metrics.wrappers.RelevancyFunction;
|
import io.nosqlbench.api.engine.metrics.wrappers.RelevancyFunction;
|
||||||
|
|
||||||
public abstract class BaseRelevancyFunction implements RelevancyFunction {
|
public abstract class BaseRelevancyFunction implements RelevancyFunction {
|
||||||
private final String name;
|
private final String name;
|
||||||
private final NBLabels labels;
|
private NBLabels labels;
|
||||||
|
|
||||||
public BaseRelevancyFunction(String name, NBLabels labels) {
|
public BaseRelevancyFunction(String name, NBLabels labels) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@@ -36,4 +37,10 @@ public abstract class BaseRelevancyFunction implements RelevancyFunction {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void prependLabels(NBLabeledElement prepend) {
|
||||||
|
this.labels = prepend.getLabels().and(this.labels);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,4 +27,6 @@ public interface RelevancyFunction extends NBLabeledElement {
|
|||||||
* @return A string which can be used to identify if the metric exists yet.
|
* @return A string which can be used to identify if the metric exists yet.
|
||||||
*/
|
*/
|
||||||
String getUniqueName();
|
String getUniqueName();
|
||||||
|
|
||||||
|
void prependLabels(NBLabeledElement prepend);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public class RelevancyMeasures implements NBLabeledElement {
|
|||||||
public RelevancyMeasures addFunction(RelevancyFunction... f) {
|
public RelevancyMeasures addFunction(RelevancyFunction... f) {
|
||||||
for (RelevancyFunction function : f) {
|
for (RelevancyFunction function : f) {
|
||||||
this.functions.add(function);
|
this.functions.add(function);
|
||||||
|
function.prependLabels(this);
|
||||||
DoubleSummaryGauge gauge = ActivityMetrics.summaryGauge(function, function.getUniqueName());
|
DoubleSummaryGauge gauge = ActivityMetrics.summaryGauge(function, function.getUniqueName());
|
||||||
this.gauges.add(gauge);
|
this.gauges.add(gauge);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user