2016-05-26 22:34:38 +03:00
|
|
|
# constants.py
|
|
|
|
#
|
|
|
|
# Copyright 2016 Facebook, Inc.
|
|
|
|
#
|
|
|
|
# This software may be used and distributed according to the terms of the
|
|
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
|
2016-06-09 00:28:14 +03:00
|
|
|
# fastmanifests are cached in .hg/store/<CACHE_SUBDIR>
|
2016-05-26 22:34:38 +03:00
|
|
|
CACHE_SUBDIR = "manifestcache"
|
2016-06-09 00:28:14 +03:00
|
|
|
|
|
|
|
# See _systemawarecachelimit in cachemanager
|
|
|
|
# for an explanation of these coefficients
|
2016-05-27 03:05:01 +03:00
|
|
|
DEFAULT_LOWGROWTH_TRESHOLDGB = 20
|
|
|
|
DEFAULT_MAXCACHESIZEGB = 6
|
|
|
|
DEFAULT_LOWGROWTH_SLOPE = 0.1
|
|
|
|
DEFAULT_HIGHGROWTHSLOPE = 0.2
|
2016-05-27 23:08:12 +03:00
|
|
|
|
2016-06-09 00:28:14 +03:00
|
|
|
# How old of a lock do we tolerate before we spawn off a new worker to populate
|
|
|
|
# the cache
|
2016-05-27 23:08:12 +03:00
|
|
|
WORKER_SPAWN_LOCK_STEAL_TIMEOUT = 300
|
2016-06-01 23:42:03 +03:00
|
|
|
|
|
|
|
# How many entries we keep in the in memory cache?
|
|
|
|
DEFAULT_MAX_MEMORY_ENTRIES = 10
|