@Test public void calculateExperimentStatisticsTest() { ExperimentCounts experimentCounts = mock(ExperimentCounts.class); Map buckets = mock(Map.class); BinomialMetrics.BinomialMetric binomialMetric = mock(BinomialMetrics.BinomialMetric.class); when(experimentCounts.getBuckets()).thenReturn(buckets); ExperimentStatistics result = this.analyticsImpl.calculateExperimentStatistics(experimentCounts, binomialMetric, 1.0 , Parameters.Mode.TEST); assertNotNull(result); }
ExperimentStatistics calculateExperimentStatistics(final ExperimentCounts counts, BinomialMetric metric, double effectSize, Parameters.Mode mode) { ExperimentStatistics statistics = new ExperimentStatistics.Builder() .withExperimentCounts(counts) .withBuckets(calculateBucketStatistics(counts.getBuckets(), metric, effectSize, mode)) .build(); analysisTools.generateRate(statistics, metric); analysisTools.generateProgress(statistics); return statistics; }
AnalyticsImpl implements Analytics { ExperimentStatistics calculateExperimentStatistics(final ExperimentCounts counts, BinomialMetric metric, double effectSize, Parameters.Mode mode) { ExperimentStatistics statistics = new ExperimentStatistics.Builder() .withExperimentCounts(counts) .withBuckets(calculateBucketStatistics(counts.getBuckets(), metric, effectSize, mode)) .build(); analysisTools.generateRate(statistics, metric); analysisTools.generateProgress(statistics); return statistics; } }
AnalyticsImpl implements Analytics { ExperimentStatistics calculateExperimentStatistics(final ExperimentCounts counts, BinomialMetric metric, double effectSize, Parameters.Mode mode) { ExperimentStatistics statistics = new ExperimentStatistics.Builder() .withExperimentCounts(counts) .withBuckets(calculateBucketStatistics(counts.getBuckets(), metric, effectSize, mode)) .build(); analysisTools.generateRate(statistics, metric); analysisTools.generateProgress(statistics); return statistics; } @Inject  AnalyticsImpl(final Experiments experiments, final AssignmentsRepository assignmentRepository,
                         final TransactionFactory dataTransactorFactory, final AnalyticsRepository analyticsRepository,
                         final AnalysisTools analysisTools,
                         final @CassandraRepository ExperimentRepository cassandraRepository); }
AnalyticsImpl implements Analytics { ExperimentStatistics calculateExperimentStatistics(final ExperimentCounts counts, BinomialMetric metric, double effectSize, Parameters.Mode mode) { ExperimentStatistics statistics = new ExperimentStatistics.Builder() .withExperimentCounts(counts) .withBuckets(calculateBucketStatistics(counts.getBuckets(), metric, effectSize, mode)) .build(); analysisTools.generateRate(statistics, metric); analysisTools.generateProgress(statistics); return statistics; } @Inject  AnalyticsImpl(final Experiments experiments, final AssignmentsRepository assignmentRepository,
                         final TransactionFactory dataTransactorFactory, final AnalyticsRepository analyticsRepository,
                         final AnalysisTools analysisTools,
                         final @CassandraRepository ExperimentRepository cassandraRepository); @Override ExperimentCounts getExperimentRollup(final Experiment.ID experimentID, final Parameters parameters); @Override ExperimentCounts getExperimentCounts(final Experiment.ID experimentID, final Parameters parameters); @Override ExperimentCumulativeCounts getExperimentRollupDailies(final Experiment.ID experimentID,
                                                                 final Parameters parameters); @Override ExperimentCumulativeCounts getExperimentCountsDailies(final Experiment.ID experimentId, final Parameters parameters); @Override ExperimentStatistics getExperimentStatistics(final Experiment.ID experimentId, final Parameters parameters); @Override ExperimentCumulativeStatistics getExperimentStatisticsDailies(final Experiment.ID experimentId,
                                                                         final Parameters parameters); @Override AssignmentCounts getAssignmentCounts(Experiment.ID experimentID, Context context); }
AnalyticsImpl implements Analytics { ExperimentStatistics calculateExperimentStatistics(final ExperimentCounts counts, BinomialMetric metric, double effectSize, Parameters.Mode mode) { ExperimentStatistics statistics = new ExperimentStatistics.Builder() .withExperimentCounts(counts) .withBuckets(calculateBucketStatistics(counts.getBuckets(), metric, effectSize, mode)) .build(); analysisTools.generateRate(statistics, metric); analysisTools.generateProgress(statistics); return statistics; } @Inject  AnalyticsImpl(final Experiments experiments, final AssignmentsRepository assignmentRepository,
                         final TransactionFactory dataTransactorFactory, final AnalyticsRepository analyticsRepository,
                         final AnalysisTools analysisTools,
                         final @CassandraRepository ExperimentRepository cassandraRepository); @Override ExperimentCounts getExperimentRollup(final Experiment.ID experimentID, final Parameters parameters); @Override ExperimentCounts getExperimentCounts(final Experiment.ID experimentID, final Parameters parameters); @Override ExperimentCumulativeCounts getExperimentRollupDailies(final Experiment.ID experimentID,
                                                                 final Parameters parameters); @Override ExperimentCumulativeCounts getExperimentCountsDailies(final Experiment.ID experimentId, final Parameters parameters); @Override ExperimentStatistics getExperimentStatistics(final Experiment.ID experimentId, final Parameters parameters); @Override ExperimentCumulativeStatistics getExperimentStatisticsDailies(final Experiment.ID experimentId,
                                                                         final Parameters parameters); @Override AssignmentCounts getAssignmentCounts(Experiment.ID experimentID, Context context); static final String PROPERTY_NAME; }