mirror of https://github.com/ivanch/tcc.git
fixes & adding spring docker
This commit is contained in:
parent
a6a8bd307b
commit
2965293bfb
|
@ -26,5 +26,5 @@ def return_ok():
|
|||
return str(sum), 200
|
||||
|
||||
@simulation_blueprint.route('/simulation/json', methods=['GET'])
|
||||
def return_ok():
|
||||
def return_helloworld():
|
||||
return simulation_controller.return_helloworld(), 200
|
||||
|
|
|
@ -49,3 +49,15 @@ services:
|
|||
limits:
|
||||
cpus: '1'
|
||||
memory: 1GB
|
||||
tcc-spring:
|
||||
image: tcc:spring
|
||||
container_name: tcc-spring
|
||||
build: ./springtcc
|
||||
restart: always
|
||||
ports:
|
||||
- "9085:8080"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 1GB
|
||||
|
|
|
@ -3,6 +3,7 @@ FRAMEWORKS = [
|
|||
('ASP.NET', 'tcc-aspnet', 'blue'),
|
||||
('Flask', 'tcc-flask', 'green'),
|
||||
('Express', 'tcc-express', 'red'),
|
||||
('Spring', 'tcc-spring', 'pink'),
|
||||
]
|
||||
|
||||
ENDPOINTS = {
|
||||
|
@ -10,6 +11,7 @@ ENDPOINTS = {
|
|||
'ASP.NET': 'http://localhost:9081',
|
||||
'Flask': 'http://localhost:9082',
|
||||
'Express': 'http://localhost:9084',
|
||||
'Spring': 'http://localhost:9085',
|
||||
}
|
||||
|
||||
AVG_RUNS = 5
|
||||
|
@ -23,6 +25,5 @@ API_REQUESTS = [
|
|||
('/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/video.mp4', 'GET', range(0, 10_000, 1_000), None),
|
||||
('/static/nginx.html', 'GET', range(0, 30_000, 5000), None),
|
||||
]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import requests
|
||||
import os
|
||||
|
||||
def download_file(url):
|
||||
local_filename = url.split('/')[-1]
|
||||
|
@ -13,5 +14,9 @@ def download_file(url):
|
|||
return local_filename
|
||||
|
||||
def init():
|
||||
download_file('https://files.ivanch.me/api/public/dl/iFuXSNhw/small-image.png')
|
||||
download_file('https://files.ivanch.me/api/public/dl/81Bkht5C/big-image.png')
|
||||
if not os.path.exists('small-image.png'):
|
||||
download_file('https://files.ivanch.me/api/public/dl/iFuXSNhw/small-image.png')
|
||||
if not os.path.exists('big-image.png'):
|
||||
download_file('https://files.ivanch.me/api/public/dl/iFuXSNhw/big-image.png')
|
||||
|
||||
init()
|
|
@ -135,6 +135,8 @@ if __name__ == "__main__":
|
|||
if not os.path.exists("data"):
|
||||
os.mkdir("data")
|
||||
|
||||
init()
|
||||
|
||||
for i in range(len(FRAMEWORKS)):
|
||||
FRAMEWORK_NAME = FRAMEWORKS[i][0]
|
||||
CONTAINER_NAME = FRAMEWORKS[i][1]
|
||||
|
|
Loading…
Reference in New Issue