scenario.py revision 3158
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
from __future__ import print_function
import gettext
import locale
import sys
import depot
import stats
"""A Scenario has a list of depot.RepositoryURIs."""
self.origin_uris = []
def get_repo_uris(self):
def get_megabytes(self):
return self.__total_mb
while total > 0:
n = len(s)
if m < n:
c = 10
else:
c = 100
print("bytes left {0:d}; retrieving {1:d} files".format(
total, c))
# get 100 files
r = s[0]
for n in range(c):
total_mb = 1000
# Scenario 1. A single origin.
# Scenario 2a. An origin and mirror, mirror faster.
# Scenario 2b. An origin and mirror, origin faster.
# Scenario 2c. An origin and mirror, mirror faster, but decaying.
# Scenario 2d. An origin and mirror, mirror slower, but increasing.
# Scenario 2e. An origin and mirror, mirror encountering decyable transport
# errors.
# Scenario 3a. An origin and two mirrors, one decaying.
# Scenario 3b. An origin and five mirrors.