Skip to content

Testing ways to add a health endpoint to a event driven micro service

Notifications You must be signed in to change notification settings

Hyzerputt/HealthEndpointTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Health Endpoint Test

Dev notes:

brew install rabbitmq

The server can then be started with rabbitmq-server.

Python modules Threading cProfile.profile + Stats .remove_dirs, sort(cum_total) profile.run_call(func)

python -m SimpleHTTPServer

pretty print to file

from pprint import pprint

myTree = {}
with open('output.txt', 'wt') as out:
    pprint(myTree, stream=out)

Use double ended queue to track last 5 response times

from collections import deque
from loguru import logger

queue = deque([0,0,0,0,0], maxlen=5)
logger.success(f"Queue initialized: q={queue}")
for i in range(10):
    queue.appendleft(i)
    logger.info(queue)

About

Testing ways to add a health endpoint to a event driven micro service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published