-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_dotenv.env
40 lines (34 loc) · 1.59 KB
/
example_dotenv.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# MONITOR SETTINGS IN DOTENV - EXAMPLE (NEEDS TWEAKING)
# API general settings
API_URL=https://dummyjson.com
API_ENV=some_env
RESOURCE_KEY=x-ratelimit-remaining # e.g. the API rate
API_RESOURCE=10000 # init with arbitrary number
MIN_RESOURCE_THRESH=5 # limit below which monitor should stop
# Request settings
DEFAULT_HEADERS='{"Content-Type": "application/json"}'
LOGIN_ENDPOINT=/auth/login
#EXTRA_LOGIN_FIELDS='{"expiresInMins": "60"}'
#PATH_TO_TOKEN=somepath.to.do - no extra nesting in dummyjson!
TOKEN_FIELD=token
HTTP_METHOD=get # method to use for dummy "ping" request post login
RESOURCE_TO_FETCH=/quotes/random
LOGIN_REQUEST_TIMEOUT=20000
DUMMY_REQUEST_TIMEOUT=10000
# Response settings - which fields are we interested in monitoring?
FIELD1_TO_MONITOR_AT_LOGIN=firstName #e.g. if response is timestamped
FIELD2_TO_MONITOR_AT_LOGIN=lastName #e.g. if response is timestamped
FIELD1_TO_MONITOR=id # e.g. random quote id from https://dummyjson.com
FIELD2_TO_MONITOR=quote # e.g. log the random quote received in the database
# Timing settings (ms)
USER_CRED_TIMEOUT=30000 #30*1000 # if user inactive at prompt
# in test
DT_FIRST_REQ=60000 #1*60*1000 # dt (auth resp --> 1st non-login req)
DT_DUMMY_REQ=60000 #1*60*1000 # dt (nth non-login resp --> (n+1)th non-login req)
# below: dt(nth cycle: (auth + [req,...,req]) --> (n+1)th cycle: (auth + [req,...,req]))
DT_AUTH_CYCLE=210000 #3.5*60*1000 # recom: read "Monitor cycling" in READme first
#12*60*1000 # will clear setIntervalAsync after this duration
DT_SESS_AFT_FIRST_RUN =720000 # in practice, e.g. 8am-11pm: 15*60*60*1000
# in prod
#DT_FIRST_REQ=600000
#etc.