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

(Updated 十月 18, 2016, 6:17 a.m.)


Review request for mesos, Benjamin Mahler, Klaus Ma, and Jiang Yan Xu.


Changes
-------

@Ben, with current update of `fragment(createRange(1, 64000), 64000/2);`, the 
benchmark test for `ports` resources contains would cost 30+s with only calling 
one contain, what about reduce the `range` size to `[1-6000]` which can control 
the elapse time in a few seconds?


Bugs: MESOS-5700
    https://issues.apache.org/jira/browse/MESOS-5700


Repository: mesos


Description
-------

Added benchmark test for `Resources::contains`.


Diffs (updated)
-----

  src/tests/resources_tests.cpp 6a12783c26f359dda835b4866b299a8fcfb3f972 

Diff: https://reviews.apache.org/r/50551/diff/


Testing (updated)
-------

make
make check

```
./bin/mesos-tests.sh  --benchmark 
--gtest_filter="*Resources_Contains_BENCHMARK_Test.Contains/*"
[==========] Running 9 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 9 tests from ResourcesContains/Resources_Contains_BENCHMARK_Test
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/0
Took 16723us to perform 5000 'superset.contains(subset)' operations on superset 
resources cpus(*):1; gpus(*):1; mem(*):128; disk(*):256 contains subset 
resources cpus(*):1; mem(*):128
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/0 (17 
ms)
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/1
Took 9675us to perform 5000 'superset.contains(subset)' operations on superset 
resources cpus(*):1; mem(*):128 contains subset resources cpus(*):1; gpus(*):1; 
mem(*):128; disk(*):256
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/1 (9 
ms)
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/2
Took 10428us to perform 5000 'superset.contains(subset)' operations on superset 
resources cpus(*):1; mem(*):128 contains subset resources cpus(*):1; mem(*):128
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/2 (11 
ms)
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/3
Took 2.016892secs to perform 100 'superset.contains(subset)' operations on 
superset resources ports(*):[1-64000] contains subset resources ports(*):[1-1, 
3-3, 5-5, 7-7, 9-9, 11-11, 13-13...
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/3 
(2041 ms)
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/4
Took 1.322314secs to perform 50 'superset.contains(subset)' operations on 
superset resources ports(*):[1-1, 3-3, 5-5, 7-7, 9-9, 11-11, 13-13... contains 
subset resources ports(*):[1-64000]
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/4 
(1343 ms)
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/5
Took 38.23282secs to perform 1 'superset.contains(subset)' operations on 
superset resources ports(*):[1-1, 3-3, 5-5, 7-7, 9-9, 11-11, 13-13... contains 
subset resources ports(*):[1-1, 3-3, 5-5, 7-7, 9-9, 11-11, 13-13...
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/5 
(38279 ms)
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/6
Took 2.087117secs to perform 100 'superset.contains(subset)' operations on 
superset resources cpus(*):1; gpus(*):1; mem(*):128; disk(*):256; ... contains 
subset resources cpus(*):1; mem(*):128; ports(*):[1-1, 3-3, 5-5,...
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/6 
(2111 ms)
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/7
Took 327807us to perform 50 'superset.contains(subset)' operations on superset 
resources cpus(*):1; mem(*):128; ports(*):[1-1, 3-3, 5-5,... contains subset 
resources cpus(*):1; gpus(*):1; mem(*):128; disk(*):256; ...
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/7 
(351 ms)
[ RUN      ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/8
Took 38.7907secs to perform 1 'superset.contains(subset)' operations on 
superset resources cpus(*):1; mem(*):128; ports(*):[1-1, 3-3, 5-5,... contains 
subset resources cpus(*):1; mem(*):128; ports(*):[1-1, 3-3, 5-5,...
[       OK ] ResourcesContains/Resources_Contains_BENCHMARK_Test.Contains/8 
(38839 ms)
[----------] 9 tests from ResourcesContains/Resources_Contains_BENCHMARK_Test 
(83002 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 1 test case ran. (83017 ms total)
[  PASSED  ] 9 tests.
```


Thanks,

Guangya Liu

Reply via email to