tcc/scripts/common.py

36 lines
1.3 KiB
Python
Raw Normal View History

2023-11-02 22:14:16 +00:00
import helloworld_pb2
helloworld = helloworld_pb2.MyObj()
helloworld.message = "Hello World!"
2023-10-03 18:31:33 +00:00
FRAMEWORKS = [
2023-10-29 22:01:24 +00:00
('Actix', 'tcc-actix', 'orange'),
('ASP.NET', 'tcc-aspnet', 'blue'),
2023-11-02 22:14:16 +00:00
('Flask', 'tcc-flask', 'grey'),
2023-10-29 22:01:24 +00:00
('Express', 'tcc-express', 'red'),
2023-11-02 22:14:16 +00:00
('Spring', 'tcc-spring', 'green'),
2023-10-03 18:31:33 +00:00
]
ENDPOINTS = {
'Actix': 'http://localhost:9083',
'ASP.NET': 'http://localhost:9081',
'Flask': 'http://localhost:9082',
'Express': 'http://localhost:9084',
2023-10-30 23:34:20 +00:00
'Spring': 'http://localhost:9085',
2023-10-03 18:31:33 +00:00
}
2023-10-29 22:01:24 +00:00
AVG_RUNS = 5
2023-11-02 22:14:16 +00:00
helloworld_pb2
2023-10-03 18:31:33 +00:00
API_REQUESTS = [
('/status/ok', 'GET', range(0, 30_000, 5000), None),
2023-11-02 22:14:16 +00:00
# ('/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()),
2023-10-29 22:01:24 +00:00
]