openwpm.utilities.storage_watchdog module

class openwpm.utilities.storage_watchdog.StorageLogger(supplied_dir: Path | None = None)[source]

Bases: Thread

Logs the total amount of storage used in the supplied_dir

run() None[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

openwpm.utilities.storage_watchdog.convert_size(size_bytes: int) str[source]
openwpm.utilities.storage_watchdog.profile_size_exceeds_max_size(profile_path: Path, max_dir_size: int) bool[source]
openwpm.utilities.storage_watchdog.total_folder_size(startup: bool = False, root_dir: str = '/tmp') str[source]

Generates a human-readable message about the current size of the directory

Parameters:
  • startup (bool, optional) – Runs the function on the total supplied folder.

  • root_dir (str, optional) – The root directory that will be recursively checked.