From eb56305091f13c44716e45746d23fe850c22803c Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 25 Jun 2021 17:27:43 -0700 Subject: [PATCH] gendummydata: lower record counts This commit halves MAX_USERS and MAX_PKGS, in addition to setting OPEN_PROPOSALS to 15 and CLOSE_PROPOSALS to 50. A few counts are now configurable via environment variable: - MAX_USERS, default: 38000 - MAX_PKGS, default: 32000 - OPEN_PROPOSALS, default: 15 - CLOSE_PROPOSALS, default: 15 Signed-off-by: Kevin Morris --- schema/gendummydata.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/schema/gendummydata.py b/schema/gendummydata.py index 11f2838a..9224b051 100755 --- a/schema/gendummydata.py +++ b/schema/gendummydata.py @@ -22,18 +22,22 @@ LOG_LEVEL = logging.DEBUG # logging level. set to logging.INFO to reduce output SEED_FILE = "/usr/share/dict/words" USER_ID = 5 # Users.ID of first bogus user PKG_ID = 1 # Packages.ID of first package -MAX_USERS = 76000 # how many users to 'register' +# how many users to 'register' +MAX_USERS = int(os.environ.get("MAX_USERS", 38000)) MAX_DEVS = .1 # what percentage of MAX_USERS are Developers MAX_TUS = .2 # what percentage of MAX_USERS are Trusted Users -MAX_PKGS = 64000 # how many packages to load +# how many packages to load +MAX_PKGS = int(os.environ.get("MAX_PKGS", 32000)) PKG_DEPS = (1, 15) # min/max depends a package has PKG_RELS = (1, 5) # min/max relations a package has PKG_SRC = (1, 3) # min/max sources a package has PKG_CMNTS = (1, 5) # min/max number of comments a package has CATEGORIES_COUNT = 17 # the number of categories from aur-schema VOTING = (0, .001) # percentage range for package voting -OPEN_PROPOSALS = 5 # number of open trusted user proposals -CLOSE_PROPOSALS = 15 # number of closed trusted user proposals +# number of open trusted user proposals +OPEN_PROPOSALS = int(os.environ.get("OPEN_PROPOSALS", 15)) +# number of closed trusted user proposals +CLOSE_PROPOSALS = int(os.environ.get("CLOSE_PROPOSALS", 50)) RANDOM_TLDS = ("edu", "com", "org", "net", "tw", "ru", "pl", "de", "es") RANDOM_URL = ("http://www.", "ftp://ftp.", "http://", "ftp://") RANDOM_LOCS = ("pub", "release", "files", "downloads", "src")