In [1]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [2]:
import pandas as pd
import seaborn as sns
from ficus import FigureManager

In [12]:
data = pd.read_csv('storage_bench_results.txt', skipinitialspace=True)

In [13]:
data.columns


Out[13]:
Index(['storage_type', 'n_hashes', 'bench', 'time'], dtype='object')

In [16]:
#with FigureManager(show=True, figsize=(12,8)) as (fig, ax):    
sns.catplot(x='storage_type', y='time', hue='n_hashes', col='bench', kind='swarm', data=data,)


Out[16]:
<seaborn.axisgrid.FacetGrid at 0x7f0cb93d4d68>

In [25]:
data = pd.read_csv('storage_bench_results_2.txt', skipinitialspace=True)

In [26]:
sns.catplot(x='storage_type', y='time', hue='n_hashes', col='bench', kind='swarm', data=data,)


Out[26]:
<seaborn.axisgrid.FacetGrid at 0x7f0cb8c52978>

In [77]:
data = pd.read_csv('storage_bench_results_3.txt', skipinitialspace=True)

In [78]:
sns.catplot(x='storage_type', y='time', hue='n_hashes', col='bench', kind='swarm', data=data,)


Out[78]:
<seaborn.axisgrid.FacetGrid at 0x7f0cb7972d68>

In [79]:
comp = data.pivot_table(index=['storage_type', 'n_hashes'], columns='bench', values=['time', 'storage_type']).reset_index()
comp.columns = [' '.join(col).strip() for col in comp.columns.values]

In [80]:
comp


Out[80]:
storage_type n_hashes time insert time insert_and_query time insert_second time query
0 BitStorage 1000000 0.059829 0.051519 0.050041 0.033410
1 BitStorage 10000000 0.663944 0.532553 0.527301 0.335135
2 BitStorage 100000000 13.421067 11.873967 11.839533 8.085970
3 ByteStorage 1000000 0.063725 0.087318 0.053965 0.035305
4 ByteStorage 10000000 1.044263 1.392820 0.952653 0.716201
5 ByteStorage 100000000 17.751100 23.662567 16.653267 12.055467
6 NibbleStorage 1000000 0.114838 0.185971 0.110701 0.057718
7 NibbleStorage 10000000 1.382013 2.108183 1.331357 0.628721
8 NibbleStorage 100000000 35.791900 42.657133 35.254100 12.048467
9 SparseppSetStorage 1000000 0.171973 0.082023 0.083155 0.058892
10 SparseppSetStorage 10000000 3.296693 1.212373 1.213280 0.951652
11 SparseppSetStorage 100000000 41.073300 18.007200 17.957800 13.985600

In [82]:
sns.relplot(x='time insert', y='time insert_and_query',  style='n_hashes', hue='storage_type', data=comp)


Out[82]:
<seaborn.axisgrid.FacetGrid at 0x7f0cb7d50f60>

In [84]:
sns.relplot(x='time insert', y='time insert_second',  style='n_hashes', hue='storage_type', data=comp)


Out[84]:
<seaborn.axisgrid.FacetGrid at 0x7f0cb7697400>

In [ ]: