mirror of https://github.com/ivanch/tcc.git
melhorando testes
This commit is contained in:
parent
fc07542237
commit
32a38fe48c
|
@ -24,7 +24,8 @@ def getData(filename):
|
||||||
|
|
||||||
def generateGraph(filename, framework_name, endpoint_name):
|
def generateGraph(filename, framework_name, endpoint_name):
|
||||||
x, y = getData(filename)
|
x, y = getData(filename)
|
||||||
plot_graph(x, y, f'{framework_name} - {endpoint_name}', 'Number of requests', 'Requests per second', filename.split('.')[0])
|
new_filename = ".".join(filename.split('.')[:-1])
|
||||||
|
plot_graph(x, y, f'{framework_name} - {endpoint_name}', 'Number of requests', 'Requests per second', new_filename)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
generateGraph('data.txt', 'ASP.NET', 'test')
|
generateGraph('data.txt', 'ASP.NET', 'test')
|
||||||
|
|
|
@ -41,7 +41,7 @@ def run_tests(endpoint):
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
|
|
||||||
for num_request in range(0, 50_000, 1000):
|
for num_request in range(0, 50_000, 5000):
|
||||||
if num_request <= 0: continue
|
if num_request <= 0: continue
|
||||||
|
|
||||||
with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
|
with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
|
||||||
|
|
Loading…
Reference in New Issue