-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70419/
-----------------------------------------------------------

(Updated April 8, 2019, 11:52 p.m.)


Review request for mesos and Benjamin Mahler.


Changes
-------

Updated summary and description.


Summary (updated)
-----------------

Refactor `Sorter::sorted()` to return abstract class `SortedClients`.


Repository: mesos


Description (updated)
-------

This patch refactors `Sorter::sorted` to return an abstract
class `SortedClients` instead of a whole `vector<string>`.
Callers can then use `SortedClients::next()` to get the
next sorted client. This paves the way for sort optimization
where sorting of the whole clients can be lazily done as callers
ask for the next client.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp 
64a076ddd29711437d539a06bb0470755828cc87 
  src/master/allocator/sorter/drf/sorter.hpp 
91a9d668b87079158f7072780dc86bb08865166e 
  src/master/allocator/sorter/drf/sorter.cpp 
554ac84ee585d1d07048a58cf7d7d1e6586252ee 
  src/master/allocator/sorter/random/sorter.hpp 
125ce84761e4c930370912151700ddda35d7b6c1 
  src/master/allocator/sorter/random/sorter.cpp 
bbe130dbf3b158ea14f9572bc5d14200fcd85127 
  src/master/allocator/sorter/sorter.hpp 
d56a1166a9e82b034564842ac071874ec2885004 
  src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 


Diff: https://reviews.apache.org/r/70419/diff/3/

Changes: https://reviews.apache.org/r/70419/diff/2-3/


Testing
-------

make check

Benchmarking:
Optimized build
Ran 
QuotaParam/BENCHMARK_HierarchicalAllocator_WithQuotaParam.LargeAndSmallQuota/2

tl;dr: minimal performance impact

## Before
Added 3000 agents in 85.844373ms
Added 3000 frameworks in 19.713969615secs
Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks
Made 3500 allocations in 13.690538305secs
Made 0 allocation in 9.76855825secs

## After
Added 3000 agents in 90.247786ms
Added 3000 frameworks in 19.094854883secs
Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks, with drf sorter
Made 3500 allocations in 13.885463083secs
Made 0 allocation in 10.165977763secs


Thanks,

Meng Zhu

Reply via email to