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



After sort the `ranges` in `validate`, the elapse time was reduced from `25+s` 
to `26992us`.

```
[ RUN      ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/2
Took 26992us to perform 1 'validate(r)' operations on ports(*):[1-1, 3-3, 5-5, 
7-7, 9-9, 11-11, 13-13...
[       OK ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/2 (55 
ms)
```

- Guangya Liu


On 十月 18, 2016, 7:05 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51033/
> -----------------------------------------------------------
> 
> (Updated 十月 18, 2016, 7:05 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5700
>     https://issues.apache.org/jira/browse/MESOS-5700
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added validation benchmark test for resources.
> 
> 
> Diffs
> -----
> 
>   src/tests/resources_tests.cpp 6a12783c26f359dda835b4866b299a8fcfb3f972 
> 
> Diff: https://reviews.apache.org/r/51033/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> ```
> ./bin/mesos-tests.sh  --benchmark 
> --gtest_filter="*Resources_Validate_BENCHMARK_Test.Validate/*"
> [==========] Running 4 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 4 tests from ResourcesValidate/Resources_Validate_BENCHMARK_Test
> [ RUN      ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/0
> Took 21152us to perform 5000 'validate(r)' operations on cpus(*):1; 
> gpus(*):1; mem(*):128; disk(*):256
> [       OK ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/0 
> (21 ms)
> [ RUN      ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/1
> Took 21312us to perform 5000 'validate(r)' operations on cpus(role1):1; 
> gpus(role2):1; mem(*):128; disk(...
> [       OK ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/1 
> (21 ms)
> [ RUN      ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/2
> Took 25.465787secs to perform 1 'validate(r)' operations on ports(*):[1-1, 
> 3-3, 5-5, 7-7, 9-9, 11-11, 13-13...
> [       OK ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/2 
> (25493 ms)
> [ RUN      ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/3
> Took 17877us to perform 5000 'validate(r)' operations on 
> disk(role)[PATH:mnt,2:path]:10
> [       OK ] ResourcesValidate/Resources_Validate_BENCHMARK_Test.Validate/3 
> (18 ms)
> [----------] 4 tests from ResourcesValidate/Resources_Validate_BENCHMARK_Test 
> (25553 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 4 tests from 1 test case ran. (25569 ms total)
> [  PASSED  ] 4 tests.
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>

Reply via email to