mirror of https://github.com/ivanch/tcc.git
mudanças
This commit is contained in:
parent
51d09be512
commit
b55d7eba06
|
@ -31,7 +31,7 @@ namespace TCC.Controllers
|
||||||
return File(blurredImageStream, "image/png");
|
return File(blurredImageStream, "image/png");
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("load-image")]
|
[HttpGet("load-small-image")]
|
||||||
public async Task<IActionResult> GetSimpleImage()
|
public async Task<IActionResult> GetSimpleImage()
|
||||||
{
|
{
|
||||||
return File(ImageService.GetSimpleImage(), "image/png");
|
return File(ImageService.GetSimpleImage(), "image/png");
|
||||||
|
|
|
@ -12,13 +12,13 @@ RUN dotnet restore
|
||||||
RUN dotnet build -c Release -o out
|
RUN dotnet build -c Release -o out
|
||||||
|
|
||||||
RUN cd out && \
|
RUN cd out && \
|
||||||
wget https://files.ivanch.me/api/public/dl/QFCLgtrG/simpleimage.png && \
|
wget https://files.ivanch.me/api/public/dl/Dj0gkp-m/small-image.png && \
|
||||||
wget https://files.ivanch.me/api/public/dl/E0VLgWbx/bigimage.png && \
|
wget https://files.ivanch.me/api/public/dl/FqHEPM1Q/big-image.png && \
|
||||||
wget https://files.ivanch.me/api/public/dl/nTAYqZwD/video.mp4 && \
|
wget https://files.ivanch.me/api/public/dl/nTAYqZwD/video.mp4 && \
|
||||||
rm -rf runtimes && \
|
rm -rf runtimes && \
|
||||||
mkdir -p ./static && \
|
mkdir -p ./static && \
|
||||||
cp simpleimage.png ./static && \
|
mv small-image.png ./static && \
|
||||||
cp bigimage.png ./static && \
|
mv big-image.png ./static && \
|
||||||
mv video.mp4 ./static
|
mv video.mp4 ./static
|
||||||
|
|
||||||
# Build runtime image
|
# Build runtime image
|
||||||
|
|
|
@ -9,8 +9,8 @@ namespace tcc_app
|
||||||
|
|
||||||
static ImageHelper()
|
static ImageHelper()
|
||||||
{
|
{
|
||||||
SimpleImage = File.ReadAllBytes("static/simpleimage.png");
|
SimpleImage = File.ReadAllBytes("static/small-image.png");
|
||||||
BigImage = File.ReadAllBytes("static/bigimage.png");
|
BigImage = File.ReadAllBytes("static/big-image.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,11 +35,11 @@ def plot_resource_graph(x_data, y_data, title, x_label, y_label, filename):
|
||||||
ax.set_xlabel(x_label)
|
ax.set_xlabel(x_label)
|
||||||
ax.set_ylabel(y_label)
|
ax.set_ylabel(y_label)
|
||||||
ax.set_title(title)
|
ax.set_title(title)
|
||||||
ax.set_xticks(x + width, requests)
|
ax.set_xticks(x + (width/2), requests)
|
||||||
ax.legend(loc='upper left', ncols=len(resource.items()))
|
ax.legend(loc='upper left', ncols=len(resource.items()))
|
||||||
ax.set_ylim(0, 100)
|
ax.set_ylim(0, 100)
|
||||||
|
|
||||||
plt.savefig(f'resources_{filename}.png')
|
plt.savefig(f'{filename}.png')
|
||||||
|
|
||||||
plt.clf()
|
plt.clf()
|
||||||
plt.close('all')
|
plt.close('all')
|
||||||
|
@ -77,11 +77,13 @@ def get_resource_data(filename):
|
||||||
def generate_req_graph(filename, framework_name, endpoint_name):
|
def generate_req_graph(filename, framework_name, endpoint_name):
|
||||||
x, y = get_data(filename)
|
x, y = get_data(filename)
|
||||||
|
|
||||||
new_filename = filename.replace('.txt', '').replace('.csv', '')
|
filename = filename.split('/')[-1]
|
||||||
|
new_filename = filename.replace('.csv', '')
|
||||||
plot_graph(x, y, f'{framework_name} - {endpoint_name}', 'Número de requisições', 'Requisições por segundo', new_filename)
|
plot_graph(x, y, f'{framework_name} - {endpoint_name}', 'Número de requisições', 'Requisições por segundo', new_filename)
|
||||||
|
|
||||||
def generate_resource_graph(filename, framework_name, endpoint_name):
|
def generate_resource_graph(filename, framework_name, endpoint_name):
|
||||||
x, y = get_resource_data(filename)
|
x, y = get_resource_data(filename)
|
||||||
|
|
||||||
new_filename = filename.replace('.txt', '').replace('.csv', '')
|
filename = filename.split('/')[-1]
|
||||||
|
new_filename = filename.replace('.csv', '')
|
||||||
plot_resource_graph(x, y, f'{framework_name} - {endpoint_name}', 'Uso de recursos', 'Uso (%)', new_filename)
|
plot_resource_graph(x, y, f'{framework_name} - {endpoint_name}', 'Uso de recursos', 'Uso (%)', new_filename)
|
Loading…
Reference in New Issue