> On Feb. 17, 2016, 10:09 a.m., Bernd Mathiske wrote: > > src/tests/fetcher_cache_tests.cpp, line 197 > > <https://reviews.apache.org/r/43367/diff/9/?file=1252393#file1252393line197> > > > > Having run multiple test suite runs, I am not convinced this has much > > of an effect. I got results between 20 and 28 seconds for all FetcherCache > > tests combined no matter what allocation interval I used: default, 500, > > 100. If there is an effect, it is less than the variance. > > haosdent huang wrote: > Looks weird, let me double check this. > > haosdent huang wrote: > I use `./bin/mesos-tests.sh --gtest_filter="FetcherCache*" > --gtest_repeat=10 2>&1 |grep total` to test. Could find use > allocation_interval from 1s to 200ms bring effect as the allocation_interval > decrease. > > Use 1 s > ``` > [==========] 11 tests from 2 test cases ran. (21652 ms total) > [==========] 11 tests from 2 test cases ran. (21278 ms total) > [==========] 11 tests from 2 test cases ran. (21077 ms total) > [==========] 11 tests from 2 test cases ran. (21447 ms total) > [==========] 11 tests from 2 test cases ran. (21594 ms total) > [==========] 11 tests from 2 test cases ran. (21364 ms total) > [==========] 11 tests from 2 test cases ran. (21085 ms total) > [==========] 11 tests from 2 test cases ran. (21773 ms total) > [==========] 11 tests from 2 test cases ran. (21737 ms total) > [==========] 11 tests from 2 test cases ran. (21075 ms total) > ``` > > Use 500 ms > ``` > [==========] 11 tests from 2 test cases ran. (18028 ms total) > [==========] 11 tests from 2 test cases ran. (18438 ms total) > [==========] 11 tests from 2 test cases ran. (18636 ms total) > [==========] 11 tests from 2 test cases ran. (18470 ms total) > [==========] 11 tests from 2 test cases ran. (17913 ms total) > [==========] 11 tests from 2 test cases ran. (18842 ms total) > [==========] 11 tests from 2 test cases ran. (18785 ms total) > [==========] 11 tests from 2 test cases ran. (18312 ms total) > [==========] 11 tests from 2 test cases ran. (18216 ms total) > [==========] 11 tests from 2 test cases ran. (18827 ms total) > ``` > > Use 200 ms > ``` > [==========] 11 tests from 2 test cases ran. (16630 ms total) > [==========] 11 tests from 2 test cases ran. (17993 ms total) > [==========] 11 tests from 2 test cases ran. (17282 ms total) > [==========] 11 tests from 2 test cases ran. (17588 ms total) > [==========] 11 tests from 2 test cases ran. (16502 ms total) > [==========] 11 tests from 2 test cases ran. (17218 ms total) > [==========] 11 tests from 2 test cases ran. (17744 ms total) > [==========] 11 tests from 2 test cases ran. (17136 ms total) > [==========] 11 tests from 2 test cases ran. (17178 ms total) > [==========] 11 tests from 2 test cases ran. (17613 ms total) > ``` > > Use 100 ms > ``` > [==========] 11 tests from 2 test cases ran. (16305 ms total) > [==========] 11 tests from 2 test cases ran. (16093 ms total) > [==========] 11 tests from 2 test cases ran. (16345 ms total) > [==========] 11 tests from 2 test cases ran. (16898 ms total) > [==========] 11 tests from 2 test cases ran. (16517 ms total) > [==========] 11 tests from 2 test cases ran. (16005 ms total) > [==========] 11 tests from 2 test cases ran. (21150 ms total) > [==========] 11 tests from 2 test cases ran. (16650 ms total) > [==========] 11 tests from 2 test cases ran. (16287 ms total) > [==========] 11 tests from 2 test cases ran. (16617 ms total) > ``` > > haosdent huang wrote: > 400 ms > ``` > [==========] 11 tests from 2 test cases ran. (17678 ms total) > [==========] 11 tests from 2 test cases ran. (17093 ms total) > [==========] 11 tests from 2 test cases ran. (17174 ms total) > [==========] 11 tests from 2 test cases ran. (17396 ms total) > [==========] 11 tests from 2 test cases ran. (18095 ms total) > [==========] 11 tests from 2 test cases ran. (17404 ms total) > [==========] 11 tests from 2 test cases ran. (17480 ms total) > [==========] 11 tests from 2 test cases ran. (17110 ms total) > [==========] 11 tests from 2 test cases ran. (17352 ms total) > [==========] 11 tests from 2 test cases ran. (17219 ms total) > ``` > > 300 ms > ``` > [==========] 11 tests from 2 test cases ran. (17165 ms total) > [==========] 11 tests from 2 test cases ran. (18067 ms total) > [==========] 11 tests from 2 test cases ran. (17951 ms total) > [==========] 11 tests from 2 test cases ran. (17602 ms total) > [==========] 11 tests from 2 test cases ran. (16994 ms total) > [==========] 11 tests from 2 test cases ran. (18004 ms total) > [==========] 11 tests from 2 test cases ran. (18533 ms total) > [==========] 11 tests from 2 test cases ran. (17897 ms total) > [==========] 11 tests from 2 test cases ran. (17246 ms total) > [==========] 11 tests from 2 test cases ran. (18364 ms total) > ``` > > Seems could not better than 16~18s in my machine. > > Bernd Mathiske wrote: > Thanks for checking! No idea why my machine is so jittery. Looks like 200 > is a winner?
Yes, 200 ms looks better. Let me change to it and update the comment @guangya mentioned. - haosdent ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43367/#review119434 ----------------------------------------------------------- On Feb. 17, 2016, 9:54 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43367/ > ----------------------------------------------------------- > > (Updated Feb. 17, 2016, 9:54 a.m.) > > > Review request for mesos, Alexander Rukletsov, Benjamin Bannier, and Bernd > Mathiske. > > > Bugs: MESOS-4628 > https://issues.apache.org/jira/browse/MESOS-4628 > > > Repository: mesos > > > Description > ------- > > Speed up FetcherCache test cases by reduce allocation_interval. > > > Diffs > ----- > > src/tests/fetcher_cache_tests.cpp fc89be46bc4cca81f6f3f5072539d3dae26f7c8f > > Diff: https://reviews.apache.org/r/43367/diff/ > > > Testing > ------- > > In this patch, we use 500ms instead of the default allocation_interval 1s. If > the test cases depends on getting offers from master multiple times, this > patch could reduce the offer waiting time and speed up them. > > Before > ``` > [ OK ] FetcherCacheTest.LocalUncached (943 ms) > [ OK ] FetcherCacheTest.LocalCached (1612 ms) > [ OK ] FetcherCacheTest.CachedFallback (906 ms) > [ OK ] FetcherCacheTest.LocalUncachedExtract (940 ms) > [ OK ] FetcherCacheTest.LocalCachedExtract (1719 ms) > [ OK ] FetcherCacheTest.SimpleEviction (3635 ms) > [ OK ] FetcherCacheTest.FallbackFromEviction (2518 ms) > [ OK ] FetcherCacheTest.RemoveLRUCacheEntries (3653 ms) > [ OK ] FetcherCacheHttpTest.HttpCachedSerialized (2632 ms) > [ OK ] FetcherCacheHttpTest.HttpCachedConcurrent (1227 ms) > [ OK ] FetcherCacheHttpTest.HttpMixed (1129 ms) > > ``` > > After > ``` > [ OK ] FetcherCacheTest.LocalUncached (979 ms) > [ OK ] FetcherCacheTest.LocalCached (1510 ms) > [ OK ] FetcherCacheTest.CachedFallback (853 ms) > [ OK ] FetcherCacheTest.LocalUncachedExtract (816 ms) > [ OK ] FetcherCacheTest.LocalCachedExtract (1715 ms) > [ OK ] FetcherCacheTest.SimpleEviction (2720 ms) > [ OK ] FetcherCacheTest.FallbackFromEviction (2119 ms) > [ OK ] FetcherCacheTest.RemoveLRUCacheEntries (2847 ms) > [ OK ] FetcherCacheHttpTest.HttpCachedSerialized (2233 ms) > [ OK ] FetcherCacheHttpTest.HttpCachedConcurrent (1211 ms) > [ OK ] FetcherCacheHttpTest.HttpMixed (1106 ms) > ``` > > > Thanks, > > haosdent huang > >