mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-11 00:12:04 -06:00
fix NPE when no filter or validator applied
This commit is contained in:
parent
17fa8500ab
commit
7b9f4389b8
@ -122,8 +122,8 @@ public class Annotators {
|
||||
}
|
||||
|
||||
public static synchronized void recordAnnotation(Annotation annotation) {
|
||||
annotation.applyLabelFunction(filter);
|
||||
annotation.applyLabelFunction(validator);
|
||||
if (filter!=null) annotation.applyLabelFunction(filter);
|
||||
if (validator!=null) annotation.applyLabelFunction(validator);
|
||||
// sanity check here first
|
||||
annotation.getLabels();
|
||||
for (Annotator annotator : getAnnotators()) {
|
||||
|
@ -76,8 +76,8 @@ public class ActivityMetrics {
|
||||
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
|
||||
private static Metric register(NBLabels labels, MetricProvider metricProvider) {
|
||||
|
||||
labels = labelFilter.apply(labels);
|
||||
labels = labelValidator.apply(labels);
|
||||
labels = labelFilter!=null ? labelFilter.apply(labels) : labels;
|
||||
labels = labelValidator != null ? labelValidator.apply(labels) : labels;
|
||||
|
||||
final String graphiteName = labels.linearizeValues('.',"[activity]","[space]","[op]","name");
|
||||
Metric metric = get().getMetrics().get(graphiteName);
|
||||
|
Loading…
Reference in New Issue
Block a user