mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 71360: Optimized shrinkResources() by filtering before copying.
Date Fri, 23 Aug 2019 19:21:10 GMT

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




src/common/resource_quantities.cpp
Lines 183-197 (patched)
<https://reviews.apache.org/r/71360/#comment304690>

    Do we need the new function? Can't we just:
    
    ```
      Value::Scalar zero;
     
      google::protobuf::RepeatedPtrField<Resource> resourceVector =
        resources.filter(
            [&target](const Resource& r) { return target.get(r.name()) != zero; });
    ```


- Benjamin Mahler


On Aug. 23, 2019, 4:56 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71360/
> -----------------------------------------------------------
> 
> (Updated Aug. 23, 2019, 4:56 a.m.)
> 
> 
> Review request for mesos, Andrei Sekretenko and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9806
>     https://issues.apache.org/jira/browse/MESOS-9806
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Master + previous patch:
> 
> HierarchicalAllocator_WithQuotaParam.LargeAndSmallQuota/2
> Made 3500 allocations in 15.635489759secs
> Made 0 allocation in 14.291803907secs
> 
> Master + previous patch + this patch:
> 
> HierarchicalAllocator_WithQuotaParam.LargeAndSmallQuota/2
> Made 3500 allocations in 15.361303511secs
> Made 0 allocation in 14.323725559secs
> 
> 
> Diffs
> -----
> 
>   include/mesos/resource_quantities.hpp cdb34271868ab5931d7e35273af1219824d4d5b9 
>   src/common/resource_quantities.cpp 7c7ede32fd6e5aa4a960a8ca030b5aba115200f6 
>   src/common/resources_utils.cpp cbdad4b045ad957b2ab1fd09a6b9fb12bb4fb523 
> 
> 
> Diff: https://reviews.apache.org/r/71360/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message