forked from 3wordchant/capsul-flask
more metrics tweaks
This commit is contained in:
parent
4ab0a0f565
commit
63a902774e
@ -97,7 +97,7 @@ def get_plot_bytes(metric, capsulid, duration, size):
|
|||||||
memory=vm["memory_mb"]*1024*1024,
|
memory=vm["memory_mb"]*1024*1024,
|
||||||
network_in=1024*1024*2,
|
network_in=1024*1024*2,
|
||||||
network_out=1024*200,
|
network_out=1024*200,
|
||||||
disk=1024*1024*4,
|
disk=1024*1024*8,
|
||||||
)
|
)
|
||||||
|
|
||||||
if metric not in metric_queries:
|
if metric not in metric_queries:
|
||||||
@ -212,6 +212,9 @@ def draw_plot_png_bytes(data, scale, size_x=3, size_y=1):
|
|||||||
|
|
||||||
image_binary = BytesIO()
|
image_binary = BytesIO()
|
||||||
fig.savefig(image_binary, transparent=True, bbox_inches="tight", pad_inches=0.05)
|
fig.savefig(image_binary, transparent=True, bbox_inches="tight", pad_inches=0.05)
|
||||||
|
|
||||||
|
pyplot.close('all')
|
||||||
|
|
||||||
return image_binary.getvalue()
|
return image_binary.getvalue()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user