Skip to content

Instantly share code, notes, and snippets.

@minisu
Created May 15, 2014 11:59
Show Gist options
  • Save minisu/f33110d77a3c54124b07 to your computer and use it in GitHub Desktop.
Save minisu/f33110d77a3c54124b07 to your computer and use it in GitHub Desktop.
package com.smartbear.saas.rs.model;
import com.google.common.collect.ImmutableSet;
import org.junit.Test;
import java.util.Set;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;
public class StatisticalVariableTest
{
@Test
public void testVariablesWithMetrics() throws Exception
{
for(int i=0; i<999_999; i++)
{
StatisticalVariable.variablesWithMetrics( ImmutableSet.of( StatisticalMetric.AVERAGE, StatisticalMetric.PERCENTILE_90TH ) );
}
long startTime = System.currentTimeMillis();
for(int i=0; i<999_999; i++)
{
StatisticalVariable.variablesWithMetrics( ImmutableSet.of( StatisticalMetric.AVERAGE, StatisticalMetric.PERCENTILE_90TH ) );
}
System.out.println("Time taken: " + (System.currentTimeMillis() - startTime) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment