test_get_exclusive Subroutine

public subroutine test_get_exclusive()

Arguments

None

Calls

proc~~test_get_exclusive~~CallsGraph proc~test_get_exclusive test_get_exclusive add_cycle add_cycle proc~test_get_exclusive->add_cycle assertequal assertequal proc~test_get_exclusive->assertequal none~add_child MeterNode%add_child proc~test_get_exclusive->none~add_child none~get_child~8 MeterNode%get_child proc~test_get_exclusive->none~get_child~8 none~get_exclusive MeterNode%get_exclusive proc~test_get_exclusive->none~get_exclusive none~get_meter MeterNode%get_meter proc~test_get_exclusive->none~get_meter none~find_child MeterNode%find_child none~add_child->none~find_child none~get_depth MeterNode%get_depth none~add_child->none~get_depth none~push_back~86 MeterNodeVector%push_back none~add_child->none~push_back~86 none~at~398 MeterNodeVector%at none~get_child~8->none~at~398 none~get_child~8->none~find_child none~begin~283 MeterNodeVector%begin none~get_exclusive->none~begin~283 none~get_inclusive MeterNode%get_inclusive none~get_exclusive->none~get_inclusive none~get~189 MeterNodeVectorIterator%get none~get_exclusive->none~get~189 none~next~174 MeterNodeVectorIterator%next none~get_exclusive->none~next~174 none~at_32~58 MeterNodeVector%at_32 none~at~398->none~at_32~58 none~find_child->none~at~398 get_total get_total none~get_inclusive->get_total none~capacity~511 MeterNodeVector%capacity none~push_back~86->none~capacity~511 none~resize~172 MeterNodeVector%resize none~push_back~86->none~resize~172 none~at_size_kind~86 MeterNodeVector%at_size_kind none~at_32~58->none~at_size_kind~86 none~resize_32~58 MeterNodeVector%resize_32 none~resize~172->none~resize_32~58

Source Code

   subroutine test_get_exclusive()
      type (MeterNode), target:: node
      class (AbstractMeter), pointer :: root_meter
      class (AbstractMeter), pointer :: submeter
      class (AbstractMeterNode), pointer :: child

      node = MeterNode('all', AdvancedMeter(MpiTimerGauge()))
      call node%add_child('sub1', AdvancedMeter(MpiTimerGauge()))

      root_meter => node%get_meter()
      child => node%get_child('sub1')
      submeter => child%get_meter()

      call submeter%add_cycle(1.0_REAL64)
      call root_meter%add_cycle(3.0_REAL64)
      @assertEqual(2.0, node%get_exclusive())

   end subroutine test_get_exclusive