Browse Source

fix poll interval

Bill Gianopoulos 1 year ago
parent
commit
52fd43f57c

+ 30 - 0
mozilla-central/patches/TOP-PLASTER-revert-poll-interval.patch

@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Bill Gianopoulos <wgianopoulos@gmail.com>
+# Date 1697543377 0
+Bug 9999999 - Revert to old poll_interval for developer builds.
+
+diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py
+--- a/python/mozbuild/mozbuild/controller/building.py
++++ b/python/mozbuild/mozbuild/controller/building.py
+@@ -182,17 +182,20 @@ class BuildMonitor(MozbuildObject):
+     """Monitors the output of the build."""
+ 
+     def init(self, warnings_path, terminal):
+         """Create a new monitor.
+ 
+         warnings_path is a path of a warnings database to use.
+         """
+         self._warnings_path = warnings_path
+-        self.resources = SystemResourceMonitor(poll_interval=0.1)
++        if "MOZ_AUTOMATION" in os.environ:
++            self.resources = SystemResourceMonitor(poll_interval=0.1)
++        else:
++            self.resources = SystemResourceMonitor(poll_interval=1.0)
+         self._resources_started = False
+ 
+         self.tiers = TierStatus(self.resources)
+ 
+         self.warnings_database = WarningsDatabase()
+         if os.path.exists(warnings_path):
+             try:
+                 self.warnings_database.load_from_file(warnings_path)

+ 1 - 0
mozilla-central/patches/series

@@ -1,2 +1,3 @@
 9999999-NSSgetentropy.patch
 1807834-respect-dmg-hfs-env.patch
+TOP-PLASTER-revert-poll-interval.patch