sapling/fastmanifest/constants.py
Laurent Charignon b9ca427342 fastmanifest: add documentation of constants
Summary:
We change pydoc to comment for the lock timeout and document the
remaining constants

Test Plan: documentation change, tests pass

Reviewers: ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3398903
2016-06-08 14:28:14 -07:00

24 lines
698 B
Python

# 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.
# fastmanifests are cached in .hg/store/<CACHE_SUBDIR>
CACHE_SUBDIR = "manifestcache"
# See _systemawarecachelimit in cachemanager
# for an explanation of these coefficients
DEFAULT_LOWGROWTH_TRESHOLDGB = 20
DEFAULT_MAXCACHESIZEGB = 6
DEFAULT_LOWGROWTH_SLOPE = 0.1
DEFAULT_HIGHGROWTHSLOPE = 0.2
# How old of a lock do we tolerate before we spawn off a new worker to populate
# the cache
WORKER_SPAWN_LOCK_STEAL_TIMEOUT = 300
# How many entries we keep in the in memory cache?
DEFAULT_MAX_MEMORY_ENTRIES = 10