Bug 1489745 - Reduce the buffer size for all tests r=gregtatum
authorJulien Wajsberg <felash@gmail.com>
Wed, 24 Oct 2018 12:09:35 +0000
changeset 491114 3312d8b04ebda7ed5b25b72fff6d68fe7a92381a
parent 491113 0dac7f40ea5fbdbf0afc927b42ae80551de1e972
child 491115 2485564ba1b4ccf49e14fcc783e2f22b950fb094
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersgregtatum
bugs1489745
milestone65.0a1
Bug 1489745 - Reduce the buffer size for all tests r=gregtatum We reduce the profiler's buffer size for all tests, to reduce the memory pressure and the overhead. This may fix some OOM intermittent crashes. Differential Revision: https://phabricator.services.mozilla.com/D8547
devtools/client/performance/test/head.js
--- a/devtools/client/performance/test/head.js
+++ b/devtools/client/performance/test/head.js
@@ -76,16 +76,21 @@ const key = (id, win = window) => {
         "to make sure it's reverted to its default value when the tests finishes, " +
         "and avoid interfering with future tests.\n");
     });
 
   // By default, enable memory flame graphs for tests for now.
   // TODO: remove when we have flame charts via bug 1148663.
   Services.prefs.setBoolPref(PrefUtils.UI_ENABLE_MEMORY_FLAME_CHART, true);
 
+  // By default, reduce the default buffer size to reduce the overhead when
+  // transfering the profile data. Hopefully this should help to reduce our
+  // intermittents for the performance tests.
+  Services.prefs.setIntPref(PrefUtils.PROFILER_BUFFER_SIZE_PREF, 100000);
+
   registerCleanupFunction(() => {
     info("finish() was called, cleaning up...");
 
     PrefUtils.rollbackPrefsToDefault();
     stopObservingPrefs();
 
     // Manually stop the profiler module at the end of all tests, to hopefully
     // avoid at least some leaks on OSX. Theoretically the module should never