Commit c036c435 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Enable pre/postfix-filtering for Metric Outputs

parent a9f1ba6d
......@@ -46,6 +46,20 @@ public abstract class AbstractOutput implements MetricOutput {
if (metric.getName().equals(string)) {
return true;
}
if (string.endsWith("*")) {
// prefix matching
String mName = metric.getName();
if (mName.startsWith(string.substring(0, string.length()-1))) {
return true;
}
}
if (string.startsWith("*")) {
// postfix matching
String mName = metric.getName();
if (mName.endsWith(string.substring(1, string.length()))) {
return true;
}
}
}
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment