mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mesos ReviewBot <revi...@mesos.apache.org>
Subject Re: Review Request 50557: Used `add` instead of `+=` for `Resources::filter`.
Date Thu, 28 Jul 2016 11:34:04 GMT

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



Patch looks great!

Reviews applied: [50380, 50551, 50553, 50556, 50557]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose'
ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On July 28, 2016, 9:29 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50557/
> -----------------------------------------------------------
> 
> (Updated July 28, 2016, 9:29 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and Klaus Ma.
> 
> 
> Bugs: MESOS-5919
>     https://issues.apache.org/jira/browse/MESOS-5919
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The current logic of `Resources::filter` is using `+=` to add
> the filtered resource object and the `+=` resource object will
> invoke `validate` which is not necessary as all of the resource
> objects are valid.
> 
> The fix is using `add` instead of `+=` for `Resources::filter`
> , this can make sure there is no validation and can improve
> performance of `Resources::filter` for resources object.
> 
> 
> Diffs
> -----
> 
>   src/common/resources.cpp 3dbff24d6859d3b1ed8589cec50170a5202cfbcb 
>   src/v1/resources.cpp 3c85dc8aa8125962b44e60806ece83a7653d0dc7 
> 
> Diff: https://reviews.apache.org/r/50557/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> The performance for `ports` resources of `r.nonRevocable()` was improved about `8s` with
1000 operations.
> 
> Before fix with validation.
> ```
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.832429secs to perform 1000 'total += r' operations on ports(*):[1-2, 4-5, 7-8,
10-11, 13-14, 16-17, 1...
> Took 22.034252secs to perform 1000 'total.contains(r)' operations on ports(*):[1-2, 4-5,
7-8, 10-11, 13-14, 16-17, 1...
> Took 3.628885secs to perform 1000 'total -= r' operations on ports(*):[1-2, 4-5, 7-8,
10-11, 13-14, 16-17, 1...
> Took 3.113548secs to perform 1000 'total = total + r' operations on ports(*):[1-2, 4-5,
7-8, 10-11, 13-14, 16-17, 1...
> Took 3.854608secs to perform 1000 'total = total - r' operations on ports(*):[1-2, 4-5,
7-8, 10-11, 13-14, 16-17, 1...
> Took 8.517941secs to perform 1000 'r.nonRevocable()' operations on ports(*):[1-2, 4-5,
7-8, 10-11, 13-14, 16-17, 1...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (43985 ms)
> ```
> 
> After fix without validation.
> ```
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.834335secs to perform 1000 'total += r' operations on ports(*):[1-2, 4-5, 7-8,
10-11, 13-14, 16-17, 1...
> Took 21.828846secs to perform 1000 'total.contains(r)' operations on ports(*):[1-2, 4-5,
7-8, 10-11, 13-14, 16-17, 1...
> Took 3.689858secs to perform 1000 'total -= r' operations on ports(*):[1-2, 4-5, 7-8,
10-11, 13-14, 16-17, 1...
> Took 2.962259secs to perform 1000 'total = total + r' operations on ports(*):[1-2, 4-5,
7-8, 10-11, 13-14, 16-17, 1...
> Took 3.760281secs to perform 1000 'total = total - r' operations on ports(*):[1-2, 4-5,
7-8, 10-11, 13-14, 16-17, 1...
> Took 125159us to perform 1000 'r.nonRevocable()' operations on ports(*):[1-2, 4-5, 7-8,
10-11, 13-14, 16-17, 1...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (35204 ms)
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


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