mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mesos Reviewbot Windows <revi...@mesos.apache.org>
Subject Re: Review Request 69032: Optimized resources filter operation.
Date Fri, 19 Oct 2018 05:56:00 GMT

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



PASS: Mesos patch 69032 was successfully built and tested.

Reviews applied: `['69032']`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2489/mesos-review-69032

- Mesos Reviewbot Windows


On Oct. 19, 2018, 4:22 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69032/
> -----------------------------------------------------------
> 
> (Updated Oct. 19, 2018, 4:22 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Gastón Kleiman.
> 
> 
> Bugs: MESOS-9325
>     https://issues.apache.org/jira/browse/MESOS-9325
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently, `Resources::filter()` operation uses `add()` which
> scans the resources vector, a O(n) operation. This is not
> necessary. `filter()` operation should only remove `Resource`
> entries. This patch optimizes the performance by directly
> `push_back` the resource to the vector without scanning.
> 
> 
> Diffs
> -----
> 
>   src/common/resources.cpp f0f3df579550d874e477e2d6e7d0e87df079358a 
>   src/v1/resources.cpp 4d2b64f6e30ef96b47fc0b72b00158864e245650 
> 
> 
> Diff: https://reviews.apache.org/r/69032/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> # Benchmarking:
> 
> ## Before
> 
> [ RUN      ] Resources_Filter_BENCHMARK_Test.Filters
> Took 29.29123ms to perform 50000 'r.nonRevocable()' operations on cpus:1; gpus:1; mem:128;
disk:256
> Took 7.129952ms to perform 50000 'r.revocable()' operations on cpus{REV}:1
> Took 28.54168ms to perform 50000 'r.unreserved()' operations on cpus:1; gpus:1; mem:128;
disk:256
> Took 36.282329ms to perform 50000 'r.reserved(role)' operations on cpus(reservations:
[(STATIC,role)]):1; gpus(reservations: [(STATIC,role)]):1; mem(reservations: [(STATIC,role)]):128;
disk(reservations: [(STATIC,role)]):256
> [       OK ] Resources_Filter_BENCHMARK_Test.Filters (101 ms)
> 
> ## After
> 
> [ RUN      ] Resources_Filter_BENCHMARK_Test.Filters
> Took 9.518106ms to perform 50000 'r.nonRevocable()' operations on cpus:1; gpus:1; mem:128;
disk:256
> Took 4.33245ms to perform 50000 'r.revocable()' operations on cpus{REV}:1
> Took 8.500219ms to perform 50000 'r.unreserved()' operations on cpus:1; gpus:1; mem:128;
disk:256
> Took 15.63636ms to perform 50000 'r.reserved(role)' operations on cpus(reservations:
[(STATIC,role)]):1; gpus(reservations: [(STATIC,role)]):1; mem(reservations: [(STATIC,role)]):128;
disk(reservations: [(STATIC,role)]):256
> [       OK ] Resources_Filter_BENCHMARK_Test.Filters (38 ms)
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


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