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




src/tests/resources_tests.cpp (lines 2537 - 2548)
<https://reviews.apache.org/r/50551/#comment210188>

    Hm.. why not have a separate 'Contains' test for this? The 'Arithmetic' 
test was only for arithemtic operations.


- Benjamin Mahler


On July 28, 2016, 6:41 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50551/
> -----------------------------------------------------------
> 
> (Updated July 28, 2016, 6:41 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Klaus Ma.
> 
> 
> Bugs: MESOS-5700
>     https://issues.apache.org/jira/browse/MESOS-5700
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added benchmark test for `Resources::contains`.
> 
> 
> Diffs
> -----
> 
>   src/tests/resources_tests.cpp 4111e080b84079e100b731c9a56861b204f17388 
> 
> Diff: https://reviews.apache.org/r/50551/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> ```
> ./bin/mesos-tests.sh --benchmark  
> --gtest_filter="ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/*"
> [==========] Running 3 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 3 tests from ResourcesOperators/Resources_BENCHMARK_Test
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0
> Took 276934us to perform 50000 'total += r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 1.395498secs to perform 50000 'total.contains(r)' operations on 
> cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
> Took 479028us to perform 50000 'total -= r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 951110us to perform 50000 'total = total + r' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> Took 1.307601secs to perform 50000 'total = total - r' operations on 
> cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0 (4413 
> ms)
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1
> Took 23.67492secs to perform 10 'total += r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 49.557323secs to perform 10 'total.contains(r)' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 23.956811secs to perform 10 'total -= r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 23.374198secs to perform 10 'total = total + r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> Took 24.492203secs to perform 10 'total = total - r' operations on cpus(0, 
> principal_0, {key_0: value_0}):1; gpus(...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/1 (145223 
> ms)
> [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2
> Took 2.705859secs to perform 1000 'total += r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 30.612245secs to perform 1000 'total.contains(r)' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.532576secs to perform 1000 'total -= r' operations on ports(*):[1-2, 
> 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 2.902233secs to perform 1000 'total = total + r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> Took 3.608806secs to perform 1000 'total = total - r' operations on 
> ports(*):[1-2, 4-5, 7-8, 10-11, 13-14, 16-17, 1...
> [       OK ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/2 (43364 
> ms)
> [----------] 3 tests from ResourcesOperators/Resources_BENCHMARK_Test (193001 
> ms total)
> 
> [----------] Global test environment tear-down
> [==========] 3 tests from 1 test case ran. (193024 ms total)
> [  PASSED  ] 3 tests.
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>

Reply via email to