mirror of https://github.com/ivanch/tcc.git
fix
This commit is contained in:
parent
83605f9095
commit
5199519634
|
@ -10,11 +10,11 @@ def plot_graph(x, y, title, x_label, y_label, filename):
|
|||
|
||||
plt.clf()
|
||||
|
||||
def plot_resource_graph(x, y, title, x_label, y_label, filename):
|
||||
requests = x
|
||||
def plot_resource_graph(x_data, y_data, title, x_label, y_label, filename):
|
||||
requests = x_data
|
||||
resource = {
|
||||
'CPU': (p[0] for p in y),
|
||||
'RAM': (p[1] for p in y),
|
||||
'CPU': [p[0] for p in y_data],
|
||||
'RAM': [p[1] for p in y_data],
|
||||
}
|
||||
|
||||
x = np.arange(len(requests))
|
||||
|
@ -68,7 +68,7 @@ def get_resource_data(filename):
|
|||
line = line.strip().split(',')
|
||||
if line:
|
||||
x.append(int(line[0])) # requests
|
||||
y.append([float(v) for v in line[1:]]) # cpu, ram
|
||||
y.append([float(v)*100 for v in line[1:]]) # cpu, ram
|
||||
|
||||
return x, y
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ def run_tests(endpoint, num_requests):
|
|||
record_resource(files[1], num_request, cpu, ram)
|
||||
|
||||
generate_req_graph(files[0], FRAMEWORK_NAME, endpoint)
|
||||
generate_req_graph(files[1], FRAMEWORK_NAME, endpoint)
|
||||
generate_resource_graph(files[1], FRAMEWORK_NAME, endpoint)
|
||||
|
||||
time.sleep(3)
|
||||
|
||||
|
|
Loading…
Reference in New Issue