In [152]:
import pandas as pd
import seaborn as sns
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
In [153]:
df = pd.read_csv("/home/vb/code/gl/viblo.se/posts/.devdrive/log-20250913.csv")
df.head()
Out[153]:
env git clone go build pollycore restore pollycore build
0 dev 9.396707 9.027582 1.252155 3.132748
1 dev 8.977330 8.949979 0.952710 1.847611
2 dev 8.182659 8.908458 0.925588 1.836672
3 dev 8.189944 9.835053 0.984734 1.854889
4 dev 8.581076 9.358740 0.980548 1.819684
In [154]:
df.describe()
Out[154]:
git clone go build pollycore restore pollycore build
count 80.000000 80.000000 80.000000 80.000000
mean 8.666601 8.886130 1.073471 2.043051
std 0.684723 1.051348 0.378670 0.700125
min 7.681987 6.819397 0.897706 1.773370
25% 8.188122 8.299738 0.934294 1.825259
50% 8.547404 9.252857 0.970038 1.846967
75% 8.912638 9.516928 1.019691 1.914963
max 10.733647 11.472750 3.595697 7.479691
In [155]:
def remove_worst_outliers(df, column):
    Q1 = df[column].quantile(0.25)
    Q3 = df[column].quantile(0.75)
    IQR = Q3 - Q1
    upper_bound = Q3 + 2 * IQR
    return df[df[column] <= upper_bound]
for col in ['git clone', 'go build', 'pollycore restore', 'pollycore build']:
    df = remove_worst_outliers(df, col)
In [156]:
df.groupby('env').mean()
df.groupby('env').median()
df.groupby('env').min()
Out[156]:
git clone go build pollycore restore pollycore build
env
dev 8.355994 9.396100 0.946092 1.838001
noav 8.892655 8.950315 0.943635 1.840549
ntfs 8.740263 9.744776 0.960335 1.925375
wsl 7.989642 7.245553 1.010941 1.840639
Out[156]:
git clone go build pollycore restore pollycore build
env
dev 8.252210 9.356297 0.935502 1.842094
noav 8.857984 8.930260 0.939725 1.830228
ntfs 8.556161 9.707799 0.956464 1.911097
wsl 7.996752 7.251345 0.998978 1.841612
Out[156]:
git clone go build pollycore restore pollycore build
env
dev 8.164013 8.908458 0.918885 1.795018
noav 8.544622 8.226923 0.902623 1.791978
ntfs 8.449004 9.419567 0.897706 1.861951
wsl 7.681987 6.819397 0.963385 1.782720
In [157]:
dfm = df.groupby('env').mean()
(-100*(dfm.sub(dfm.loc['ntfs'], axis=1) / dfm.loc['ntfs'])).round()

dfm = df.groupby('env').median()
(-100*(dfm.sub(dfm.loc['ntfs'], axis=1) / dfm.loc['ntfs'])).round()
Out[157]:
git clone go build pollycore restore pollycore build
env
dev 4.0 4.0 1.0 5.0
noav -2.0 8.0 2.0 4.0
ntfs -0.0 -0.0 -0.0 -0.0
wsl 9.0 26.0 -5.0 4.0
Out[157]:
git clone go build pollycore restore pollycore build
env
dev 4.0 4.0 2.0 4.0
noav -4.0 8.0 2.0 4.0
ntfs -0.0 -0.0 -0.0 -0.0
wsl 7.0 25.0 -4.0 4.0
In [158]:
df2 = df.melt(id_vars=['env'], value_vars=['git clone','go build','pollycore restore','pollycore build'], var_name='action', value_name='time')
In [159]:
sns.set_context("notebook")
import matplotlib.pyplot as plt
for action in df2.action.unique():
    sns.catplot(data=df2[(df2.action == action)], hue="env", x="time", col='action', kind='box', aspect=1.5)
    plt.savefig(action + ".png")
Out[159]:
<seaborn.axisgrid.FacetGrid at 0x718c50f55250>
Out[159]:
<seaborn.axisgrid.FacetGrid at 0x718c50db5be0>
Out[159]:
<seaborn.axisgrid.FacetGrid at 0x718c50bdaa80>
Out[159]:
<seaborn.axisgrid.FacetGrid at 0x718c5389f140>
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image