test_get_mean_cycle Subroutine

public subroutine test_get_mean_cycle()

Arguments

None

Calls

proc~~test_get_mean_cycle~~CallsGraph proc~test_get_mean_cycle test_get_mean_cycle assertequal assertequal proc~test_get_mean_cycle->assertequal none~add_cycle~2 AdvancedMeter%add_cycle proc~test_get_mean_cycle->none~add_cycle~2 none~get_mean_cycle AdvancedMeter%get_mean_cycle proc~test_get_mean_cycle->none~get_mean_cycle none~reset~30 AdvancedMeter%reset proc~test_get_mean_cycle->none~reset~30 none~add_cycle~2->none~get_mean_cycle none~get_num_cycles AdvancedMeter%get_num_cycles none~get_mean_cycle->none~get_num_cycles

Source Code

   subroutine test_get_mean_cycle()
      type (AdvancedMeter) :: t

      t = AdvancedMeter(MpiTimerGauge())
      call t%add_cycle(increment=1._REAL64)
      call t%add_cycle(increment=3._REAL64)
      @assertEqual(2., t%get_mean_cycle())

      call t%reset()
      call t%add_cycle(increment=3._REAL64)
      call t%add_cycle(increment=5._REAL64)
      @assertEqual(4., t%get_mean_cycle())

   end subroutine test_get_mean_cycle