Example #1
0
    public OutputStatSet GetStats()
    {
        OutputStatSet nurseryStat = null;
        OutputStatSet majorStat = null;
        OutputStatSet resultStat = new OutputStatSet ();
        IEnumerable<GCCollection> majorList;

        if (majorSyncCollections.Count > 0) {
            majorList = majorSyncCollections;
            Utils.Assert (majorConcCollections.Count == 0);
        } else if (majorConcCollections.Count > 0) {
            majorList = majorConcCollections;
            Utils.Assert (majorSyncCollections.Count == 0);
        } else {
            majorList = new List<GCCollection> ();
        }

        resultStat |= new OutputStat ("Time (s)", Time, CumulationType.AVERAGE);
        resultStat |= new OutputStat ("Num Minor", nurseryCollections.Count, CumulationType.AVERAGE);
        resultStat |= new OutputStat ("Num Major", majorList.Count<GCCollection> (), CumulationType.AVERAGE);
        resultStat |= new OutputStat ("Avg Mem Usage (MB)", ComputeMemoryUsage (), CumulationType.AVERAGE);

        resultStat |= OutputStat.EmptyStat;
        foreach (NurseryCollection nurseryCollection in nurseryCollections)
            nurseryStat += nurseryCollection.GetStats ();
        if (nurseryStat != null)
            nurseryStat.Normalize ();
        resultStat |= nurseryStat;

        resultStat |= OutputStat.EmptyStat;
        foreach (GCCollection majorCollection in majorList)
            majorStat += majorCollection.GetStats ();
        if (majorStat != null)
            majorStat.Normalize ();
        resultStat |= majorStat;

        return resultStat;
    }
Example #2
0
 public virtual OutputStatSet GetStats()
 {
     OutputStatSet stats = new OutputStatSet ();
     stats |= new OutputStat (string.Format ("{0} Custom Range (ms)", major ? "Major" : "Minor"), (custom_event_end - custom_event_start) * 1000, CumulationType.MIN_MAX_AVG, true);
     return stats;
 }
 public override OutputStatSet GetStats()
 {
     OutputStatSet stats = new OutputStatSet ();
     stats |= new OutputStat ("Total Major Pause (ms)", (end_timestamp - start_timestamp) * 1000, CumulationType.SUM);
     stats |= new OutputStat ("Evacuated block sizes", evacuated_block_sizes, CumulationType.MIN_MAX_AVG);
     stats ^= new OutputStat ("Major Pause (ms)", (end_timestamp - start_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
     stats |= new OutputStat ("Major Finish GS (ms)", (finish_gray_stack_end - finish_gray_stack_start) * 1000, CumulationType.MIN_MAX_AVG);
     if (concurrent_sweep_end > end_timestamp) {
         if (next_nursery_start != default(double) && concurrent_sweep_end > next_nursery_start) {
             Utils.Assert (next_nursery_start > end_timestamp);
             stats |= new OutputStat ("Concurrent Sweep (ms)", (next_nursery_start - end_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
             stats |= new OutputStat ("Forced finish Sweep (ms)", (concurrent_sweep_end - next_nursery_start) * 1000, CumulationType.MIN_MAX_AVG);
         } else {
             stats |= new OutputStat ("Concurrent Sweep (ms)", (concurrent_sweep_end - end_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
             stats |= new OutputStat ("Forced finish Sweep (ms)", 0, CumulationType.MIN_MAX_AVG);
         }
     } else {
         stats |= new OutputStat ("Concurrent Sweep (ms)", 0, CumulationType.MIN_MAX_AVG);
         stats |= new OutputStat ("Forced finish Sweep (ms)", 0, CumulationType.MIN_MAX_AVG);
     }
     return stats | base.GetStats ();
 }
 public override OutputStatSet GetStats()
 {
     OutputStatSet stats = new OutputStatSet ();
     stats |= new OutputStat ("Total Major Pause (ms)", (end_timestamp - start_of_end_timestamp + end_of_start_timestamp - start_timestamp) * 1000, CumulationType.SUM);
     stats |= new OutputStat ("Evacuated block sizes", evacuated_block_sizes, CumulationType.MIN_MAX_AVG);
     stats |= new OutputStat ("Start Pause (ms)", (end_of_start_timestamp - start_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
     stats |= new OutputStat ("Minor while Conc", num_minor, CumulationType.MIN_MAX_AVG);
     if (pre_major_mod_union_scan_start != default(double)) {
         stats |= new OutputStat ("Conc M&S (ms)", (pre_major_mod_union_scan_start - end_of_start_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
         stats |= new OutputStat ("Major Mod Preclean (ms)", (pre_major_mod_union_scan_end - pre_major_mod_union_scan_start) * 1000, CumulationType.MIN_MAX_AVG);
         stats |= new OutputStat ("LOS Mod Preclean (ms)", (pre_los_mod_union_scan_end - pre_los_mod_union_scan_start) * 1000, CumulationType.MIN_MAX_AVG);
         if (worker_finish_forced != default(double))
             stats |= new OutputStat ("Finish conc M&S (ms)", (worker_finish_forced - pre_los_mod_union_scan_end) * 1000, CumulationType.MIN_MAX_AVG);
         else
             stats |= new OutputStat ("Finish conc M&S (ms)", (worker_finish - pre_los_mod_union_scan_end) * 1000, CumulationType.MIN_MAX_AVG);
     } else {
         if (worker_finish_forced != default(double))
             stats |= new OutputStat ("Conc M&S (ms)", (worker_finish_forced - end_of_start_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
         else
             stats |= new OutputStat ("Conc M&S (ms)", (worker_finish - end_of_start_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
         stats |= new OutputStat ("Major Mod Preclean (ms)", 0, CumulationType.MIN_MAX_AVG);
         stats |= new OutputStat ("LOS Mod Preclean (ms)", 0, CumulationType.MIN_MAX_AVG);
         stats |= new OutputStat ("Finish conc M&S (ms)", 0, CumulationType.MIN_MAX_AVG);
     }
     stats ^= new OutputStat ("Major Pause (ms)", (end_timestamp - start_of_end_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
     if (worker_finish_forced != default(double))
         stats |= new OutputStat ("Forced finish (ms)", (worker_finish - start_of_end_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
     else
         stats |= new OutputStat ("Forced finish (ms)", 0, CumulationType.MIN_MAX_AVG);
     stats |= new OutputStat ("Mod Union Major Scan (ms)", (major_mod_union_scan_end - major_mod_union_scan_start) * 1000, CumulationType.MIN_MAX_AVG);
     stats |= new OutputStat ("Mod Union LOS Scan (ms)", (los_mod_union_scan_end - los_mod_union_scan_start) * 1000, CumulationType.MIN_MAX_AVG);
     stats |= new OutputStat ("Major Finish GS (ms)", (finish_gray_stack_end - finish_gray_stack_start) * 1000, CumulationType.MIN_MAX_AVG);
     if (concurrent_sweep_end > end_timestamp) {
         if (next_nursery_start != default(double) && concurrent_sweep_end > next_nursery_start) {
             Utils.Assert (next_nursery_start > end_timestamp);
             stats |= new OutputStat ("Concurrent Sweep (ms)", (next_nursery_start - end_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
             stats |= new OutputStat ("Forced finish Sweep (ms)", (concurrent_sweep_end - next_nursery_start) * 1000, CumulationType.MIN_MAX_AVG);
         } else {
             stats |= new OutputStat ("Concurrent Sweep (ms)", (concurrent_sweep_end - end_timestamp) * 1000, CumulationType.MIN_MAX_AVG);
             stats |= new OutputStat ("Forced finish Sweep (ms)", 0, CumulationType.MIN_MAX_AVG);
         }
     } else {
         stats |= new OutputStat ("Concurrent Sweep (ms)", 0, CumulationType.MIN_MAX_AVG);
         stats |= new OutputStat ("Forced finish Sweep (ms)", 0, CumulationType.MIN_MAX_AVG);
     }
     return stats | base.GetStats ();
 }