static void one_concurrent() { TimePartitions time_partitions; time_partitions.report_gc_phase_start("ConcurrentPhase", 2, GCPhase::ConcurrentPhaseType); time_partitions.report_gc_phase_end(8, GCPhase::ConcurrentPhaseType); TimePartitionPhasesIterator iter(&time_partitions); validate_gc_phase(iter.next(), 0, "ConcurrentPhase", 2, 8); // ConcurrentPhaseType should not affect to both 'sum_of_pauses()' and 'longest_pause()'. assert(time_partitions.sum_of_pauses() == Tickspan(), "Incorrect"); assert(time_partitions.longest_pause() == Tickspan(), "Incorrect"); assert(!iter.has_next(), "Too many elements"); }
void TimePartitions::clear() { _phases->clear(); _active_phases.clear(); _sum_of_pauses = Tickspan(); _longest_pause = Tickspan(); }
inline Tickspan operator-(const Ticks& end, const Ticks& start) { return Tickspan(end, start); }