mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-26 00:31:07 -06:00
formatting
This commit is contained in:
parent
6d8443e6b8
commit
d3b3490bc7
@ -90,9 +90,9 @@ public class MetricReporters implements Shutdownable {
|
||||
}
|
||||
}
|
||||
|
||||
public MetricReporters addGraphite(String host, int graphitePort, String prefix) {
|
||||
public MetricReporters addGraphite(String host, int graphitePort, String globalPrefix) {
|
||||
|
||||
logger.debug("Adding graphite reporter to " + host + " with port " + graphitePort + " and prefix " + prefix);
|
||||
logger.debug("Adding graphite reporter to " + host + " with port " + graphitePort + " and prefix " + globalPrefix);
|
||||
|
||||
if (metricRegistries.isEmpty()) {
|
||||
throw new RuntimeException("There are no metric registries.");
|
||||
@ -101,8 +101,9 @@ public class MetricReporters implements Shutdownable {
|
||||
for (PrefixedRegistry prefixedRegistry : metricRegistries) {
|
||||
|
||||
Graphite graphite = new Graphite(new InetSocketAddress(host, graphitePort));
|
||||
String _prefix = prefixedRegistry.prefix != null ? (!prefixedRegistry.prefix.isEmpty() ? globalPrefix + "." + prefixedRegistry.prefix : globalPrefix) : globalPrefix;
|
||||
GraphiteReporter graphiteReporter = GraphiteReporter.forRegistry(prefixedRegistry.metricRegistry)
|
||||
.prefixedWith(prefixedRegistry.prefix != null ? (!prefixedRegistry.prefix.isEmpty() ? prefix + "." + prefixedRegistry.prefix : prefix) : prefix)
|
||||
.prefixedWith(_prefix)
|
||||
.convertRatesTo(TimeUnit.SECONDS)
|
||||
.convertDurationsTo(TimeUnit.NANOSECONDS)
|
||||
.filter(ActivityMetrics.METRIC_FILTER)
|
||||
|
@ -39,9 +39,9 @@ public class NBCliIntegrationTests {
|
||||
public void listWorkloadsTest() {
|
||||
ProcessInvoker invoker = new ProcessInvoker();
|
||||
invoker.setLogDir("logs/test");
|
||||
ProcessResult result = invoker.run("workload-test", 15,
|
||||
java, "-jar", JARNAME, "--logs-dir", "logs/test", "--list" +
|
||||
"-workloads"
|
||||
ProcessResult result = invoker.run(
|
||||
"workload-test", 15, java, "-jar",
|
||||
JARNAME, "--logs-dir", "logs/test", "--list-workloads"
|
||||
);
|
||||
System.out.println(result.getStdoutData());
|
||||
System.out.println(result.getStderrData());
|
||||
|
Loading…
Reference in New Issue
Block a user