tcc/scripts/common.py

36 lines
1.3 KiB
Python

import helloworld_pb2
helloworld = helloworld_pb2.MyObj()
helloworld.message = "Hello World!"
FRAMEWORKS = [
('Actix', 'tcc-actix', 'orange'),
('ASP.NET', 'tcc-aspnet', 'blue'),
('Flask', 'tcc-flask', 'grey'),
('Express', 'tcc-express', 'red'),
('Spring', 'tcc-spring', 'green'),
]
ENDPOINTS = {
'Actix': 'http://localhost:9083',
'ASP.NET': 'http://localhost:9081',
'Flask': 'http://localhost:9082',
'Express': 'http://localhost:9084',
'Spring': 'http://localhost:9085',
}
AVG_RUNS = 5
helloworld_pb2
API_REQUESTS = [
('/status/ok', 'GET', range(0, 30_000, 5000), None),
# ('/simulation/harmonic-progression?n=100000', 'GET', range(0, 30_000, 5000), None),
# ('/simulation/json', 'GET', range(0, 30_000, 5000), None),
# ('/image/save-big-image', 'POST', range(0, 500, 50), open('big-image.png', 'rb').read()),
# ('/image/load-small-image', 'GET', range(0, 30_000, 5000), None),
# ('/static/small-image.png', 'GET', range(0, 30_000, 5000), None),
# ('/image/load-big-image', 'GET', range(0, 500, 50), None),
# ('/static/big-image.png', 'GET', range(0, 500, 50), None),
# ('/static/nginx.html', 'GET', range(0, 30_000, 5000), None),
('/simulation/protobuf', 'POST', range(0, 30_000, 5000), helloworld.SerializeToString()),
]