public Builder() { this.item = new ExperimentStatistics(); }
@Override public ExperimentStatistics clone() { ExperimentStatistics cloned = (ExperimentStatistics) super.clone(); if (jointProgress != null) { cloned.setJointProgress(jointProgress.clone()); } if (experimentProgress != null) { cloned.setExperimentProgress(experimentProgress.clone()); } if (buckets != null) { Map<Bucket.Label, BucketStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } if (actionProgress != null) { Map<Event.Name, ActionProgress> clonedActions = new HashMap<>(); for (Entry<Name, ActionProgress> entry : actionProgress.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionProgress(clonedActions); } return cloned; }
Map<Bucket.Label, BucketStatistics> buckets = experiment.getBuckets(); Set<Event.Name> actionNames = new HashSet<>(); .withFractionDataCollected(fractionOfData) .build(); experiment.setJointProgress(jointProgress); experiment.setActionProgress(actionProgresses); experiment.setExperimentProgress(new Progress.Builder().withWinnersSoFar(winnersList) .withLosersSoFar(losersList) .withSufficientData(sufficientData)
Map<Label, BucketStatistics> bucketAnalytics = expStats.getBuckets(); List<BucketAssignmentCount> bucketAssignments = assignmentCounts.getAssignments(); b.setLoserSoFar(false); if (expStats.getJointProgress().getWinnersSoFar().contains(b.getLabel())) { b.setWinnerSoFar(true); if (expStats.getJointProgress().getLosersSoFar().contains(b.getLabel())) { b.setLoserSoFar(true);
@Override public DailyStatistics clone() { DailyStatistics cloned; try { cloned = (DailyStatistics) super.clone(); } catch (CloneNotSupportedException e) { // Should never happen throw new AnalyticsException("DailyStatistics clone not supported: " + e.getMessage(), e); } if (perDay != null) { cloned.perDay = perDay.clone(); } if (cumulative != null) { cloned.cumulative = cumulative.clone(); } return cloned; } }