@classmethod
  def GetAverageLoad(cls):
    all_infos = cls.GetAll()
    total_load = 0
    cluster_size = 0
    for info in all_infos.values():
      if cls.LOAD in info:
        cluster_size += 1
        total_load += info[cls.LOAD]
    if not cluster_size:
      return 0, 0
    return cluster_size, total_load / cluster_size
Calculates average load of all instances.
dataset/ETHPy150Open GoogleCloudPlatform/solutions-load-balanced-gaming-server-on-google-compute-engine/load_info.py/LoadInfo.GetAverageLoad