mirror of https://github.com/ivanch/tcc.git
Compare commits
No commits in common. "9082b34aabcb843eb243f5c57710120d532d2e16" and "095f04e113e354e6a4205198bde32e740ca4c238" have entirely different histories.
9082b34aab
...
095f04e113
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
|
@ -37,15 +37,4 @@ services:
|
||||||
limits:
|
limits:
|
||||||
cpus: '1'
|
cpus: '1'
|
||||||
memory: 1GB
|
memory: 1GB
|
||||||
tcc-express:
|
|
||||||
image: tcc:express
|
|
||||||
container_name: tcc-express
|
|
||||||
build: ./tcc-express
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- "9084:5000"
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpus: '1'
|
|
||||||
memory: 1GB
|
|
||||||
|
|
|
@ -2,14 +2,12 @@ FRAMEWORKS = [
|
||||||
('Actix', 'tcc-actix'),
|
('Actix', 'tcc-actix'),
|
||||||
('ASP.NET', 'tcc-aspnet'),
|
('ASP.NET', 'tcc-aspnet'),
|
||||||
('Flask', 'tcc-flask'),
|
('Flask', 'tcc-flask'),
|
||||||
('Express', 'tcc-express'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
ENDPOINTS = {
|
ENDPOINTS = {
|
||||||
'Actix': 'http://localhost:9083',
|
'Actix': 'http://localhost:9083',
|
||||||
'ASP.NET': 'http://localhost:9081',
|
'ASP.NET': 'http://localhost:9081',
|
||||||
'Flask': 'http://localhost:9082',
|
'Flask': 'http://localhost:9082',
|
||||||
'Express': 'http://localhost:9084',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BLUR_RADIUS = 5
|
BLUR_RADIUS = 5
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import os
|
import os
|
||||||
from common import API_REQUESTS, FRAMEWORKS
|
from common import API_REQUESTS
|
||||||
|
|
||||||
FRAMEWORKS = [f for f, _ in FRAMEWORKS]
|
FRAMEWORKS = ['Actix', 'ASP.NET', 'Flask']
|
||||||
|
|
||||||
def plot_graph(x_data, y_data, title, x_label, y_label, filename):
|
def plot_graph(x_data, y_data, title, x_label, y_label, filename):
|
||||||
for i, framework in enumerate(FRAMEWORKS):
|
for i, framework in enumerate(FRAMEWORKS):
|
||||||
|
@ -91,7 +91,7 @@ def generate_req_graph(filename, framework_name, endpoint_name):
|
||||||
|
|
||||||
for f in FRAMEWORKS:
|
for f in FRAMEWORKS:
|
||||||
newfile = filename.replace(framework_name, f)
|
newfile = filename.replace(framework_name, f)
|
||||||
_, y_data = get_data(newfile)
|
_, y_data = get_resource_data(newfile)
|
||||||
|
|
||||||
y.append(y_data)
|
y.append(y_data)
|
||||||
|
|
||||||
|
@ -116,11 +116,11 @@ if __name__ == '__main__':
|
||||||
endpoints = [config[0] for config in API_REQUESTS]
|
endpoints = [config[0] for config in API_REQUESTS]
|
||||||
|
|
||||||
for endpoint_name in endpoints:
|
for endpoint_name in endpoints:
|
||||||
framework_name = 'ASP.NET'
|
framework_name = 'Actix'
|
||||||
endpoint_file = endpoint_name.replace('/', '')
|
endpoint_file = endpoint_name.replace('/', '')
|
||||||
|
|
||||||
filename = f'data/resource_ASP.NET_{endpoint_file}.csv'
|
filename = f'data/resource_Actix_{endpoint_file}.csv'
|
||||||
generate_resource_graph(filename, framework_name, endpoint_name)
|
generate_resource_graph(filename, framework_name, endpoint_name)
|
||||||
|
|
||||||
filename = f'data/req_ASP.NET_{endpoint_file}.csv'
|
filename = f'data/req_Actix_{endpoint_file}.csv'
|
||||||
generate_req_graph(filename, framework_name, endpoint_name)
|
generate_req_graph(filename, framework_name, endpoint_name)
|
||||||
|
|
Loading…
Reference in New Issue