• Home
  • Raw
  • Download

Lines Matching +full:monitor +full:- +full:script +full:- +full:pid

2 # Use of this source code is governed by a BSD-style license that can be
29 right: Optional[bool]) -> Optional[bool]:
44 right: Optional[Number]) -> Optional[Number]:
54 right: Optional[Number]) -> Optional[Number]:
64 right: Optional[List[str]]) -> Optional[List[str]]:
90 def merge(self, other: HostEnvironmentConfig) -> HostEnvironmentConfig:
163 enforce: Tries to auto-enforce conditions and warns about others.
165 fail: Fast-fail on mismatch
194 def platform(self) -> Platform:
198 def repetitions(self) -> int:
202 def browsers(self) -> Tuple[Browser, ...]:
206 def config(self) -> HostEnvironmentConfig:
210 def validation_mode(self) -> ValidationMode:
213 def _add_min_delay(self, seconds: float) -> None:
217 def _wait_min_time(self) -> None:
218 delta = self._wait_until - dt.datetime.now()
222 def handle_validation_warning(self, message: str) -> None:
228 allow_interactive: bool = True) -> None:
230 - throw an error,
231 - log a warning,
232 - prompts for continue [Yn], or
233 - skips (and just debug logs) a warning.
256 platform: plt.Platform = plt.PLATFORM) -> bool:
279 def _check_system_monitoring(self) -> None:
284 def _check_crowdstrike(self) -> None:
285 """Crowdstrike security monitoring (for googlers go/crowdstrike-falcon) can
286 have quite terrible overhead for each file-access. Disable it to reduce
294 # Add cool-down period, crowdstrike caused CPU usage spikes
298 "Could not disable go/crowdstrike-falcon monitor which can cause"
308 def _check_disk_space(self) -> None:
319 def _check_power(self) -> None:
339 def _check_cpu_usage(self) -> None:
349 def _check_cpu_temperature(self) -> None:
360 def _check_forbidden_system_process(self) -> None:
373 def _check_screen_autobrightness(self) -> None:
379 "Auto-brightness was found to be ON. "
382 def _check_cpu_power_mode(self) -> bool:
386 def _check_running_binaries(self) -> None:
395 self, platform: plt.Platform, platform_browsers: List[Browser]) -> None:
399 for proc_info in platform.processes(["cmdline", "exe", "pid", "name"]):
402 # Skip over this python script which might have the binary path as
404 if proc_info["pid"] == own_pid:
416 # Add a white-space to get less false-positives
423 logging.debug("proc(pid=%s, name=%s, cmd=%s)", proc_info["pid"],
428 # Avoid re-checking the same binary once we've allowed it to be running.
431 def _check_screen_brightness(self) -> None:
443 def _check_headless(self) -> None:
462 def _check_probes(self) -> None:
475 def _check_results_dir(self) -> None:
494 def _check_macos_terminal(self) -> None:
505 def check_browser_focused(self, browser: Browser) -> None:
506 if (self._config.browser_allow_background or not browser.pid or
512 if info["pid"] != browser.pid:
514 f"Browser(name={browser.unique_name} pid={browser.pid})) "
519 def setup(self) -> None:
522 def validate(self) -> None:
523 logging.info("-" * 80)
529 message += " (--env-validation=warn for soft warnings)"
550 message: str = "Missing binaries: {}") -> None:
559 message: str = "Could not execute: {}") -> None: