Esempio n. 1
0
        /// <summary>
        /// Retrieves the overall quarterly and weekly scores
        /// </summary>
        /// <returns>The score summary</returns>
        public virtual ScoreSummary GetOverallScores()
        {
            var summary = new ScoreSummary();
            var scores  = GetQualityOfServiceScores();

            if (scores != null)
            {
                var userExperienceScore       = scores.Min(x => x.UserExperienceScore).GetValueOrDefault(100);
                var weeklyUserExperienceScore = scores.Min(x => x.WeeklyUserExperienceScore).GetValueOrDefault(100);
                var systemLoadScore           = scores.Min(x => x.SystemLoadScore).GetValueOrDefault(100);
                var weeklySystemLoadScore     = scores.Min(x => x.WeeklySystemLoadScore).GetValueOrDefault(100);
                var integrityScore            = scores.Min(x => x.IntegrityScore).GetValueOrDefault(100);
                var weeklyIntegrityScore      = scores.Min(x => x.WeeklyIntegrityScore).GetValueOrDefault(100);
                var uptimeScore       = scores.Min(x => x.UptimeScore).GetValueOrDefault(100);
                var weeklyUptimeScore = scores.Min(x => x.WeeklyUptimeScore).GetValueOrDefault(100);

                var quarterlyScore = (userExperienceScore + systemLoadScore + integrityScore + uptimeScore) / 4;
                var weeklyScore    = (weeklyUserExperienceScore + weeklySystemLoadScore + weeklyIntegrityScore + weeklyUptimeScore) / 4;

                summary.QuarterlyScore = (int)quarterlyScore;
                summary.WeeklyScore    = (int)weeklyScore;
                summary.QuarterlyUserExperienceScore = (int)userExperienceScore;
                summary.QuarterlySystemLoadScore     = (int)systemLoadScore;
                summary.QuarterlyIntegrityScore      = (int)integrityScore;
                summary.QuarterlyUptimeScore         = (int)uptimeScore;
                summary.WeeklyUserExperienceScore    = (int)weeklyUserExperienceScore;
                summary.WeeklySystemLoadScore        = (int)weeklySystemLoadScore;
                summary.WeeklyIntegrityScore         = (int)weeklyIntegrityScore;
                summary.WeeklyUptimeScore            = (int)weeklyUptimeScore;
            }

            return(summary);
        }
Esempio n. 2
0
 public void SetScore(ScoreSummary summary, int segments)
 {
     this.summary = summary;
     this.segments = segments;
     UpdateHeaders();
     StartCoroutine(MakeReport());
 }
 /// <summary>
 /// Produces the body of the weekly score report.
 /// Notifications need to include the quarterly and weekly scores in all areas.
 /// </summary>
 /// <param name="scores">The score summary</param>
 /// <param name="instanceName">The name of the relativity instance</param>
 /// <returns>The weekly email body</returns>
 private static string BuildQuarterlyScoreStatus(ScoreSummary scores, string instanceName)
 {
     return(string.Format(Resources.Weekly,
                          instanceName,
                          scores.QuarterlyScore,
                          scores.QuarterlyUserExperienceScore,
                          scores.QuarterlySystemLoadScore,
                          scores.QuarterlyIntegrityScore,
                          scores.QuarterlyUptimeScore,
                          scores.WeeklyScore,
                          scores.WeeklyUserExperienceScore,
                          scores.WeeklySystemLoadScore,
                          scores.WeeklyIntegrityScore,
                          scores.WeeklyUptimeScore));
 }
        /// <summary>
        /// Produces the body of the daily score report.
        /// Daily alerts should indicate why they're being sent (because the quarterly score dipped below the "good" threshold).
        /// Notifications need to include the quarterly and weekly scores in all areas.
        /// </summary>
        /// <param name="scores">The score summary</param>
        /// <param name="instanceName">The name of the relativity instance</param>
        /// <param name="scoreBelowThreshold">Indicates if the score is below the threshold</param>
        /// <returns>The quarterly email body</returns>
        private static string BuildQuarterlyScoreAlert(ScoreSummary scores, string instanceName, bool scoreBelowThreshold)
        {
            var scoreStatusMessage = scoreBelowThreshold
                                ? "is below the expected threshold. Please review the score report below and take action to ensure Best in Service eligibility."
                                : "is now within the expected threshold.";

            return(string.Format(Resources.Daily,
                                 instanceName,
                                 scoreStatusMessage,
                                 scores.QuarterlyScore,
                                 scores.QuarterlyUserExperienceScore,
                                 scores.QuarterlySystemLoadScore,
                                 scores.QuarterlyIntegrityScore,
                                 scores.QuarterlyUptimeScore,
                                 scores.WeeklyScore,
                                 scores.WeeklyUserExperienceScore,
                                 scores.WeeklySystemLoadScore,
                                 scores.WeeklyIntegrityScore,
                                 scores.WeeklyUptimeScore));
        }
Esempio n. 5
0
    // Use this for initialization
    public void showScore(ScoreSummary scoreSummary)
    {
        modal.gameObject.SetActive(true);
        modal.SetTitle("Song Cleared!");
        modal.SetCancelEnabled(false);
        modal.SetNoEnabled(false);
        modal.SetOkayText("Continue");

        modal.SetOkayOnClick(() => {
            SceneManager.LoadScene("SongBrowser");
        });

        modal.SetRows(new List <RowMeta> {
            { new RowMeta("Perfect", scoreSummary.numPerfect) },
            { new RowMeta("Great", scoreSummary.numGreat) },
            { new RowMeta("Okay", scoreSummary.numOkay) },
            { new RowMeta("Coffin", scoreSummary.numCoffin) },
            { new RowMeta("Miss", scoreSummary.numMiss) },
            { new RowMeta("Max Combo", scoreSummary.maxCombo) },
            { new RowMeta("Score", scoreSummary.score + "/" + scoreSummary.totalScore) },
            { new RowMeta("Grade", scoreSummary.grade) },
        });
    }
 internal NativeScore LocalUserScore()
 {
     return(NativeScore.FromPointer(ScoreSummary.ScoreSummary_CurrentPlayerScore(base.SelfPtr())));
 }
 protected override void CallDispose(HandleRef selfPointer)
 {
     ScoreSummary.ScoreSummary_Dispose(selfPointer);
 }
 internal ulong ApproximateResults()
 {
     return(ScoreSummary.ScoreSummary_ApproximateNumberOfScores(base.SelfPtr()));
 }