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 51034: Avoid validate star role when validating `Role` object.
Date Fri, 12 Aug 2016 15:20:23 GMT

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



Patch looks great!

Reviews applied: [50380, 50551, 50556, 51033, 51034]

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 Aug. 12, 2016, 11:50 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51034/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2016, 11:50 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `roles::validate` is time consuming and it was called by
> `Resources::validate`, the `Resources::validate` was called
> frequently when add/subtract `Resource` object.
> 
> This patch is avoiding the `roles::validate` for star role as
> there is no need to validate such role.
> 
> 
> Diffs
> -----
> 
>   src/common/roles.cpp 017f8a6ed7d9bd081953e41e2cf7b333ef9f9039 
> 
> Diff: https://reviews.apache.org/r/51034/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> Before fix:
> ```
> [==========] Running 4 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 4 tests from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/0
> Took 44396us to perform 50000 'validate(r)' operations on cpus(*):1; gpus(*):1; mem(*):128;
disk(*):256
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/0 (45 ms)
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/1
> Took 10034us to perform 10 'validate(r)' operations on cpus(0, principal_0, {key_0: value_0}):1;
gpus(...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/1 (25 ms)
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/2
> Took 2.825012secs to perform 1000 'validate(r)' operations on ports(*):[1-2, 4-5, 7-8,
10-11, 13-14, 16-17, 1...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/2 (2825 ms)
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/3
> Took 39538us to perform 50000 'validate(r)' operations on cpus(*):1; mem(*):128; disk(test)[persistentId:...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/3 (40 ms)
> [----------] 4 tests from ResourcesOperators/Resources_BENCHMARK_Test (2935 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 4 tests from 1 test case ran. (2944 ms total)
> [  PASSED  ] 4 tests.
> ```
> 
> After fix:
> ```
> [==========] Running 4 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 4 tests from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/0
> Took 18079us to perform 50000 'validate(r)' operations on cpus(*):1; gpus(*):1; mem(*):128;
disk(*):256
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/0 (21 ms)
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/1
> Took 9943us to perform 10 'validate(r)' operations on cpus(0, principal_0, {key_0: value_0}):1;
gpus(...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/1 (22 ms)
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/2
> Took 2.585535secs to perform 1000 'validate(r)' operations on ports(*):[1-2, 4-5, 7-8,
10-11, 13-14, 16-17, 1...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/2 (2586 ms)
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/3
> Took 24314us to perform 50000 'validate(r)' operations on cpus(*):1; mem(*):128; disk(test)[persistentId:...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Validations/3 (25 ms)
> [----------] 4 tests from ResourcesOperators/Resources_BENCHMARK_Test (2654 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 4 tests from 1 test case ran. (2666 ms total)
> [  PASSED  ] 4 tests.
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


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