use of com.yahoo.jdisc.core.SystemTimer in project vespa by vespa-engine.
the class StateMonitorBenchmarkTest method requireThatHealthMonitorDoesNotBlockMetricThreads.
@Test
public void requireThatHealthMonitorDoesNotBlockMetricThreads() throws Exception {
StateMonitor monitor = new StateMonitor(new HealthMonitorConfig(new HealthMonitorConfig.Builder()), new SystemTimer());
Provider<MetricConsumer> provider = MetricConsumerProviders.wrap(monitor);
performUpdates(provider, 8);
for (int i = 1; i <= NUM_THREADS; i *= 2) {
long millis = performUpdates(provider, i);
System.err.format("%2d threads, %5d millis => %9d ups\n", i, millis, (int) ((i * NUM_UPDATES) / (millis / 1000.0)));
}
monitor.deconstruct();
}
Aggregations