Skip to content

Instantly share code, notes, and snippets.

@kakugirai
Created July 30, 2018 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kakugirai/1e36253423c32ad0c3b84ddbfc3272c0 to your computer and use it in GitHub Desktop.
Save kakugirai/1e36253423c32ad0c3b84ddbfc3272c0 to your computer and use it in GitHub Desktop.
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib.pyplot import figure
figure(num=None, figsize=(10, 6), dpi=200, facecolor='w', edgecolor='k')
sns.set(color_codes=True)
# color_codes=True
# In[65]:
figure(num=None, figsize=(12, 6), dpi=200, facecolor='w', edgecolor='k')
perf_syscall = pd.read_csv("https://gist.githubusercontent.com/kakugirai/3de0be35508fb37002441210c2182db6/raw/d8f32fb93988fbe7bc6eadc84e3f2e4a4bc2d079/perf_syscall.csv")
syscall_plot = sns.lmplot(x="queue", y="syscalls", hue="tag", col="tag", data=perf_syscall)
plt.xlabel("NIC transmit and receive queue size")
plt.ylabel("Syscalls/sec")
# syscall_plot.savefig("syscall_plot.png", dpi=300)
# files.download("syscall_plot.png")
# sns.lineplot(x="queue", y="syscalls", data=perf_syscall)
# In[62]:
figure(num=None, figsize=(12, 6), dpi=200, facecolor='w', edgecolor='k')
wss = pd.read_csv("https://gist.githubusercontent.com/kakugirai/ae31ba2282b220451f13556d4ea264cb/raw/d82938a0bbc984085cd9c65ae67150ef70381a23/wss.csv")
wss_plot = sns.lineplot(x="queue", y="RSS", hue="tag", markers=True, dashes=False, data=wss)
plt.xlabel("NIC transmit and receive queue size")
plt.ylabel("Resident memory(MB)")
# wss_plot.savefig("wss_plot.png", dpi=300)
# files.download("wss_plot.png")
# In[64]:
# Working_set_size
figure(num=None, figsize=(10, 6), dpi=200, facecolor='w', edgecolor='k')
wss = pd.read_csv("https://gist.githubusercontent.com/kakugirai/ae31ba2282b220451f13556d4ea264cb/raw/d82938a0bbc984085cd9c65ae67150ef70381a23/wss.csv")
wss_plot = sns.lineplot(x="queue", y="RSS", hue="tag", style="role", markers=True, dashes=False, data=wss)
plt.xlabel("NIC transmit and receive queue size")
plt.ylabel("Resident memory(MB)")
wss_plot_fig = wss_plot2.get_figure()
wss_plot_fig.savefig("wss_plot_fig.png")
# In[4]:
figure(num=None, figsize=(10, 6), dpi=200, facecolor='w', edgecolor='k')
batch_speed = pd.read_csv("https://gist.githubusercontent.com/kakugirai/133c35ea9eb71fde70c2e56c5f1b1b1f/raw/3e8e575904f54470d2929e2e72b63952b9989032/batch.csv")
batch_speed_plot = sns.lineplot(x="batch", y="speed", hue="tag", style="version", markers=True, dashes=False, data=batch_speed)
plt.xlabel("batch size")
plt.ylabel("Tx rate (Mpps)")
batch_speed_fig = batch_speed_plot.get_figure()
batch_speed_fig.savefig("batch_speed_fig.png")
# In[3]:
# batch_syscalls_plot
figure(num=None, figsize=(10, 6), dpi=200, facecolor='w', edgecolor='k')
batch_syscalls = pd.read_csv("https://gist.githubusercontent.com/kakugirai/133c35ea9eb71fde70c2e56c5f1b1b1f/raw/3e8e575904f54470d2929e2e72b63952b9989032/batch.csv")
batch_syscalls_plot = sns.lineplot(x="batch", y="syscalls", hue="tag", style="version", markers=True, dashes=False, data=batch_syscalls)
plt.xlabel("batch size")
plt.ylabel("Syscalls/sec")
batch_syscalls_fig = batch_syscalls_plot.get_figure()
batch_syscalls_fig.savefig("batch_syscalls_fig.png")
# In[2]:
figure(num=None, figsize=(10, 6), dpi=200, facecolor='w', edgecolor='k')
speed = pd.read_csv("https://gist.githubusercontent.com/kakugirai/e59a70e041f5d60f94fdd29c2eea2612/raw/5060df4e358edcee3640fc471bcc3805b1923418/line_speed.csv")
speed_plot = sns.lineplot(x="queue", y="speed", hue="tag", style="tag", markers=True, dashes=False, data=speed)
# speed_plot.set_axis_labels("NIC transmit and receive queue size", "Transmission Speed (Mpps)")
plt.xlabel("NIC queue size")
plt.ylabel("Tx rate (Mpps)")
speed_fig = speed_plot.get_figure()
speed_fig.savefig("speed_fig.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment