@Test public void downSamplesCorrectlyWhenUniform() { MultisetStatistics stats = new MultisetStatistics(); for (int i = 0; i < 10; ++i) { for (double number : SMALL_SAMPLE) { stats.addValue(number, 2); } } Mockito.when(mockResult.getStatistics()).thenReturn(stats); assertThat(PerformanceResults.getData(mockRunResult)).containsExactlyElementsOf(SMALL_SAMPLE); }
@VisibleForTesting static List<Double> getData(RunResult result) { return getRawResults(result.getPrimaryResult().getStatistics()); }
PerformanceResults { @VisibleForTesting static List<Double> getData(RunResult result) { return getRawResults(result.getPrimaryResult().getStatistics()); } }
PerformanceResults { @VisibleForTesting static List<Double> getData(RunResult result) { return getRawResults(result.getPrimaryResult().getStatistics()); } PerformanceResults(Collection<RunResult> results); }
PerformanceResults { @VisibleForTesting static List<Double> getData(RunResult result) { return getRawResults(result.getPrimaryResult().getStatistics()); } PerformanceResults(Collection<RunResult> results); void writeToFile(File file); }
PerformanceResults { @VisibleForTesting static List<Double> getData(RunResult result) { return getRawResults(result.getPrimaryResult().getStatistics()); } PerformanceResults(Collection<RunResult> results); void writeToFile(File file); static final int DOWNSAMPLE_MAXIMUM_SIZE; }