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
--- 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