All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.l4.vibe.internal.builder.TimerBuilderImpl Maven / Gradle / Ivy

package se.l4.vibe.internal.builder;

import se.l4.vibe.backend.VibeBackend;
import se.l4.vibe.builder.TimerBuilder;
import se.l4.vibe.internal.timer.TimerImpl;
import se.l4.vibe.percentile.BucketPercentileCounter;
import se.l4.vibe.percentile.FakePercentileCounter;
import se.l4.vibe.percentile.PercentileCounter;
import se.l4.vibe.timer.Timer;

/**
 * Implementation of {@link TimerBuilder}.
 * 
 * @author Andreas Holstenson
 *
 */
public class TimerBuilderImpl
	extends AbstractBuilder
	implements TimerBuilder
{
	private VibeBackend backend;
	private PercentileCounter percentileCounter;
	
	public TimerBuilderImpl(VibeBackend backend)
	{
		this.backend = backend;
		percentileCounter = new FakePercentileCounter();
	}

	@Override
	public TimerBuilder withBuckets(int... limits)
	{
		int[] msLimits = new int[limits.length];
		for(int i=0, n=limits.length; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy