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~3 MeterNode%add_child proc~test_get_exclusive->none~add_child~3 none~get_child~25 MeterNode%get_child proc~test_get_exclusive->none~get_child~25 none~get_exclusive~2 MeterNode%get_exclusive proc~test_get_exclusive->none~get_exclusive~2 none~get_meter~3 MeterNode%get_meter proc~test_get_exclusive->none~get_meter~3 none~find_child MeterNode%find_child none~add_child~3->none~find_child none~get_depth~2 MeterNode%get_depth none~add_child~3->none~get_depth~2 none~push_back~35 MeterNodeVector%push_back none~add_child~3->none~push_back~35 none~at~157 MeterNodeVector%at none~get_child~25->none~at~157 none~get_child~25->none~find_child none~begin~118 MeterNodeVector%begin none~get_exclusive~2->none~begin~118 none~get_inclusive~2 MeterNode%get_inclusive none~get_exclusive~2->none~get_inclusive~2 none~get~81 MeterNodeVectorIterator%get none~get_exclusive~2->none~get~81 none~next~68 MeterNodeVectorIterator%next none~get_exclusive~2->none~next~68 none~at_32~26 MeterNodeVector%at_32 none~at~157->none~at_32~26 none~find_child->none~at~157 get_total get_total none~get_inclusive~2->get_total none~capacity~205 MeterNodeVector%capacity none~push_back~35->none~capacity~205 none~resize~70 MeterNodeVector%resize none~push_back~35->none~resize~70 none~at_size_kind~35 MeterNodeVector%at_size_kind none~at_32~26->none~at_size_kind~35 none~resize_32~26 MeterNodeVector%resize_32 none~resize~70->none~resize_32~26

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