> On Dec. 13, 2016, 4:30 p.m., Jiang Yan Xu wrote: > > src/tests/hierarchical_allocator_tests.cpp, lines 3005-3006 > > <https://reviews.apache.org/r/51028/diff/4/?file=1513695#file1513695line3005> > > > > Similar to Guangya's suggestion, I think we can elaborate on the reason > > to use tow agents and two frameworks. > > > > ``` > > Trigger at least two allocation runs to generate the window statistics. > > Here we are using two pairs of `addSlave()` and `addFramework()` calls > > because each guarantees one allocation run that yields an `Allocation`. > > ```
I realized all we need is to await the allocation after `addSlave()` as well as `addFramework()` to ensure that we have window metrics. > On Dec. 13, 2016, 4:30 p.m., Jiang Yan Xu wrote: > > src/tests/hierarchical_allocator_tests.cpp, lines 3621-3629 > > <https://reviews.apache.org/r/51028/diff/4/?file=1513695#file1513695line3621> > > > > I think we are still intereted in the number of allocations and we > > expect to see them decrease because of batching. We don't use EXPECT on > > them but we print them out as part of the benchmark? Added this in. Ex test output: [ RUN ] SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.AddAndUpdateSlave/5 Using 1000 agents and 1000 frameworks Added 1000 frameworks in 18064us Added 1000 agents in 5.229825secs performing 1000 allocations Updated 1000 agents in 5.39987secs performing 1000 allocations [ OK ] SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.AddAndUpdateSlave/5 (10708 ms) - Jacob ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51028/#review158967 ----------------------------------------------------------- On Sept. 28, 2016, 9:16 p.m., Jacob Janco wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51028/ > ----------------------------------------------------------- > > (Updated Sept. 28, 2016, 9:16 p.m.) > > > Review request for mesos and Jiang Yan Xu. > > > Bugs: MESOS-3157 > https://issues.apache.org/jira/browse/MESOS-3157 > > > Repository: mesos > > > Description > ------- > > - Per MESOS-3157, if cluster events with the possibility > of triggering an allocation occur rapidly and test > assertions depend on gleaning information from assumed > order, it is likely they will fail due to lack of parity > between event and actual allocation. Ensure that expected > allocations occur. > > > Diffs > ----- > > src/tests/hierarchical_allocator_tests.cpp > 46553f6d501deb37862dd5ba48be1c114f6e6cb8 > > Diff: https://reviews.apache.org/r/51028/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jacob Janco > >
