----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50693/#review147615 -----------------------------------------------------------
src/tests/hierarchical_allocator_tests.cpp (line 239) <https://reviews.apache.org/r/50693/#comment214813> Have this method call the other one? - Jiang Yan Xu On Aug. 26, 2016, 12:56 a.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50693/ > ----------------------------------------------------------- > > (Updated Aug. 26, 2016, 12:56 a.m.) > > > Review request for mesos, Benjamin Mahler, Vinod Kone, and Jiang Yan Xu. > > > Repository: mesos > > > Description > ------- > > In allocator benchmark test, when `addSlave`, the test will first > create slave info, but currently, the parameter for `createSlaveInfo` > is a resource string, and this caused the `createSlaveInfo` will > always parse resource first before set resource for the agent. This > caused the time of adding agent is not accurate. > > This fix is adding another function named as `createSlaveInfo` but > taking `Resources` as input parameter, this will remove the time > of parsing resources when setting resource for the agent and thus > making the time of adding agent more accurate. > > > Diffs > ----- > > src/tests/hierarchical_allocator_tests.cpp > cbed333f497016fe2811f755028796012b41db77 > > Diff: https://reviews.apache.org/r/50693/diff/ > > > Testing > ------- > > make > make check > > Before fix adding 30000 agents. > ``` > [==========] Running 1 test from 1 test case. > [----------] Global test environment set-up. > [----------] 1 test from > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test > [ RUN ] > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/32 > Set quota for 1 roles in 1216us > Added 1 frameworks in 509us > Added 30000 agents in 14.515326secs > /metrics/snapshot took 48615us for 30000 agents and 1 frameworks > [ OK ] > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/32 (14679 > ms) > [----------] 1 test from > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test (14679 ms total) > ``` > > After fix adding 30000 agents. > ``` > [==========] Running 1 test from 1 test case. > [----------] Global test environment set-up. > [----------] 1 test from > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test > [ RUN ] > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/32 > Set quota for 1 roles in 1238us > Added 1 frameworks in 555us > Added 30000 agents in 13.976131secs > /metrics/snapshot took 58360us for 30000 agents and 1 frameworks > [ OK ] > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/32 (14139 > ms) > [----------] 1 test from > SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test (14140 ms total) > ``` > > > Thanks, > > Guangya Liu > >
