// Path: src/main/java/com/etsy/statsd/profiler/Profiler.java
// public abstract class Profiler {
//     public static final Class<?>[] CONSTRUCTOR_PARAM_TYPES = new Class<?>[]{Reporter.class, Arguments.class};
// 
//     private final Reporter<?> reporter;
// 
//     private long recordedStats = 0;
//     public Profiler(Reporter reporter, Arguments arguments) {
//         Preconditions.checkNotNull(reporter);
//         this.reporter = reporter;
//         handleArguments(arguments);
//     }
// 
//     /**
//      * Perform profiling
//      */
//     public abstract void profile();
// 
//     /**
//      * Hook to flush any remaining data cached by the profiler at JVM shutdown
//      */
//     public abstract void flushData();
// 
//     /**
//      * Get the period to use for this profiler in the ScheduledExecutorService
//      *
//      * @return The ScheduledExecutorThread period for this profiler
//      */
//     public abstract long getPeriod();
// 
//     /**
//      * Get the unit of time that corresponds to the period for this profiler
//      *
//      * @return A TimeUnit corresponding the the period for this profiler
//      */
//     public abstract TimeUnit getTimeUnit();
// 
//     /**
//      * CPUTracingProfiler can emit some metrics that indicate the upper and lower bound on the length of stack traces
//      * This is helpful for querying this data for some backends (such as Graphite) that do not have rich query languages
//      * Reporters can override this to disable these metrics
//      *
//      * @return true if the bounds metrics should be emitted, false otherwise
//      */
//     protected boolean emitBounds() {
//         return reporter.emitBounds();
//     }
// 
//     /**
//      * Handle any additional arguments necessary for this profiler
//      *
//      * @param arguments The arguments given to the profiler
//      */
//     protected abstract void handleArguments(Arguments arguments);
// 
//     /**
//      * Record a gauge value
//      *
//      * @param key The key for the gauge
//      * @param value The value of the gauge
//      */
//     protected void recordGaugeValue(String key, long value) {
//         recordedStats++;
//         reporter.recordGaugeValue(key, value);
//     }
// 
//     /**
//      * @see #recordGaugeValue(String, long)
//      */
//     protected void recordGaugeValue(String key, double value) {
//         recordedStats++;
//         reporter.recordGaugeValue(key, value);
//     }
// 
//     /**
//      * Record multiple gauge values
//      * This is useful for reporters that can send points in batch
//      *
//      * @param gauges A map of gauge names to values
//      */
//     protected void recordGaugeValues(Map<String, ? extends Number> gauges) {
//         recordedStats++;
//         reporter.recordGaugeValues(gauges);
//     }
// 
//     public long getRecordedStats() { return recordedStats; }
// }
// 
// Path: src/test/java/com/etsy/statsd/profiler/profilers/MockProfiler1.java
// public class MockProfiler1 extends Profiler {
//     private Set<String> output;
// 
//     public MockProfiler1(Set<String> output) {
//         super(new MockReporter(), null);
//         this.output = output;
//     }
// 
//     @Override
//     public void profile() {
//         output.add(this.getClass().getSimpleName() + "-profile");
//     }
// 
//     @Override
//     public void flushData() {
//         output.add(this.getClass().getSimpleName() + "-flushData");
//     }
// 
//     @Override
//     public long getPeriod() {
//         return 1;
//     }
// 
//     @Override
//     public TimeUnit getTimeUnit() {
//         return TimeUnit.MINUTES;
//     }
// 
//     @Override
//     protected void handleArguments(Arguments arguments) { }
// }


import com.etsy.statsd.profiler.Profiler;
import com.etsy.statsd.profiler.profilers.MockProfiler1;
import org.junit.Test;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
import static org.junit.Assert.*;
package com.etsy.statsd.profiler.worker;




public class ProfilerWorkerThreadTest {
    @Test
    public void testRunnable() throws InterruptedException {
        Set<String> output = new HashSet<>();
        Profiler mockProfiler1 = new MockProfiler1(output);

        Thread t = new Thread(new ProfilerWorkerThread(mockProfiler1, new LinkedList<String>()));
// Path: src/main/java/com/etsy/statsd/profiler/Profiler.java
// public abstract class Profiler {
//     public static final Class<?>[] CONSTRUCTOR_PARAM_TYPES = new Class<?>[]{Reporter.class, Arguments.class};
// 
//     private final Reporter<?> reporter;
// 
//     private long recordedStats = 0;
//     public Profiler(Reporter reporter, Arguments arguments) {
//         Preconditions.checkNotNull(reporter);
//         this.reporter = reporter;
//         handleArguments(arguments);
//     }
// 
//     /**
//      * Perform profiling
//      */
//     public abstract void profile();
// 
//     /**
//      * Hook to flush any remaining data cached by the profiler at JVM shutdown
//      */
//     public abstract void flushData();
// 
//     /**
//      * Get the period to use for this profiler in the ScheduledExecutorService
//      *
//      * @return The ScheduledExecutorThread period for this profiler
//      */
//     public abstract long getPeriod();
// 
//     /**
//      * Get the unit of time that corresponds to the period for this profiler
//      *
//      * @return A TimeUnit corresponding the the period for this profiler
//      */
//     public abstract TimeUnit getTimeUnit();
// 
//     /**
//      * CPUTracingProfiler can emit some metrics that indicate the upper and lower bound on the length of stack traces
//      * This is helpful for querying this data for some backends (such as Graphite) that do not have rich query languages
//      * Reporters can override this to disable these metrics
//      *
//      * @return true if the bounds metrics should be emitted, false otherwise
//      */
//     protected boolean emitBounds() {
//         return reporter.emitBounds();
//     }
// 
//     /**
//      * Handle any additional arguments necessary for this profiler
//      *
//      * @param arguments The arguments given to the profiler
//      */
//     protected abstract void handleArguments(Arguments arguments);
// 
//     /**
//      * Record a gauge value
//      *
//      * @param key The key for the gauge
//      * @param value The value of the gauge
//      */
//     protected void recordGaugeValue(String key, long value) {
//         recordedStats++;
//         reporter.recordGaugeValue(key, value);
//     }
// 
//     /**
//      * @see #recordGaugeValue(String, long)
//      */
//     protected void recordGaugeValue(String key, double value) {
//         recordedStats++;
//         reporter.recordGaugeValue(key, value);
//     }
// 
//     /**
//      * Record multiple gauge values
//      * This is useful for reporters that can send points in batch
//      *
//      * @param gauges A map of gauge names to values
//      */
//     protected void recordGaugeValues(Map<String, ? extends Number> gauges) {
//         recordedStats++;
//         reporter.recordGaugeValues(gauges);
//     }
// 
//     public long getRecordedStats() { return recordedStats; }
// }
// 
// Path: src/test/java/com/etsy/statsd/profiler/profilers/MockProfiler1.java
// public class MockProfiler1 extends Profiler {
//     private Set<String> output;
// 
//     public MockProfiler1(Set<String> output) {
//         super(new MockReporter(), null);
//         this.output = output;
//     }
// 
//     @Override
//     public void profile() {
//         output.add(this.getClass().getSimpleName() + "-profile");
//     }
// 
//     @Override
//     public void flushData() {
//         output.add(this.getClass().getSimpleName() + "-flushData");
//     }
// 
//     @Override
//     public long getPeriod() {
//         return 1;
//     }
// 
//     @Override
//     public TimeUnit getTimeUnit() {
//         return TimeUnit.MINUTES;
//     }
// 
//     @Override
//     protected void handleArguments(Arguments arguments) { }
// }


// Path: src/test/java/com/etsy/statsd/profiler/worker/ProfilerWorkerThreadTest.java
import com.etsy.statsd.profiler.Profiler;
import com.etsy.statsd.profiler.profilers.MockProfiler1;
import org.junit.Test;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
import static org.junit.Assert.*;

package com.etsy.statsd.profiler.worker;




public class ProfilerWorkerThreadTest {
    @Test
    public void testRunnable() throws InterruptedException {
        Set<String> output = new HashSet<>();
        Profiler mockProfiler1 = new MockProfiler1(output);

        Thread t = new Thread(new ProfilerWorkerThread(mockProfiler1, new LinkedList<String>()));
        t.run();