mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-23 15:40:44 -06:00
support openmetrics symbolic views
This commit is contained in:
parent
cf510ddf1a
commit
9de6bad6ff
@ -120,6 +120,18 @@ public class MapLabels implements NBLabels {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String linearizeAsMetrics() {
|
||||
StringBuilder sb = new StringBuilder("{");
|
||||
this.labels.forEach((k,v) -> {
|
||||
sb.append(k).append(":\"").append(v).append("\",");
|
||||
});
|
||||
sb.setLength(sb.length()-",".length());
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapLabels and(final Object... labelsAndValues) {
|
||||
final Map<String,String> childLabels = getStringStringMap(labelsAndValues);
|
||||
|
@ -170,6 +170,8 @@ public interface NBLabels {
|
||||
*/
|
||||
Map<String, String> asMap();
|
||||
|
||||
String linearizeAsMetrics();
|
||||
|
||||
/**
|
||||
* @return a new set of labels which includes only those which are not using per-instance semantics.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user