In [2]:
%matplotlib inline
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from IPython.display import HTML
In [3]:
df = pd.read_csv('alltests_with_normalized_results.csv')
In [4]:
norm_grouped = df.groupby(['benchmark', 'machine', 'limits'])['normalized'].mean().to_frame()
In [5]:
HTML(norm_grouped.to_html())
Out[5]:
In [6]:
withcpu_only = norm_grouped.copy()
withcpu_only.reset_index(inplace=True)
withcpu_only = withcpu_only[withcpu_only['limits'] != 'without']
len(withcpu_only.index)
Out[6]:
In [7]:
# show number of tests with normalized result (speedup/slowdown) within 10% of the base result
len(withcpu_only[(withcpu_only.normalized >= 0.90) & (withcpu_only.normalized <= 1.10)])
Out[7]:
In [8]:
# show number of tests with normalized result outside this 10%
len(withcpu_only[((withcpu_only['normalized'] < 0.90) | (withcpu_only['normalized'] > 1.10))])
Out[8]:
In [9]:
plt.figure(figsize=(20,10))
bins=[.5, .55,.6,.65,.7,.75,.8,.85,.9,.95,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.55,1.6,1.65,1.7,1.75,1.8,1.85,1.9,1.95,2]
ax = withcpu_only[withcpu_only['machine'] == 'issdm-3'].normalized.hist(bins=20,xrot=90)
ticks = ax.set_xticks(bins)
ticks = ax.set_yticks(range(0,16))
In [10]:
withcpumem_only = norm_grouped.copy()
withcpumem_only.reset_index(inplace=True)
withcpumem_only = withcpumem_only[withcpumem_only['limits'] == 'withmemcpu']
len(withcpumem_only.index)
Out[10]:
In [11]:
plt.figure(figsize=(20,10))
bins=[.5, .55,.6,.65,.7,.75,.8,.85,.9,.95,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.55,1.6,1.65,1.7,1.75,1.8,1.85,1.9,1.95,2]
ax = withcpu_only.normalized.hist(bins=bins,xrot=90)
ticks = ax.set_xticks(bins)
ticks = ax.set_yticks(range(0,16))
In [14]:
df = pd.read_csv('alltests_with_normalized_results.csv')
In [15]:
df.benchmark.unique()
Out[15]:
In [16]:
len(df.benchmark.unique())
Out[16]:
In [17]:
norm_grouped = df.copy().groupby(['benchmark','machine', 'limits', 'class'])['normalized'].mean().to_frame()
In [18]:
norm_grouped.reset_index(inplace=True)
In [19]:
norm_grouped.copy().groupby(['machine', 'limits', 'class'])['normalized'].mean().to_frame()
Out[19]:
In [20]:
norm_grouped.copy().groupby(['machine', 'limits', 'class'])['normalized'].median().to_frame()
Out[20]:
In [21]:
norm_grouped[(norm_grouped.normalized > .83) & (norm_grouped.normalized < .93)].copy().groupby(['machine', 'limits', 'class'])['normalized'].count().to_frame()
Out[21]:
In [22]:
pd.unique(norm_grouped['class'])
Out[22]:
In [23]:
df[(df['machine'] == 'nibbler.soe.ucsc.edu') & (df['benchmark'] == 'stressng-cpu-bitops')]
Out[23]:
In [24]:
pd.unique(norm_grouped.machine)
Out[24]:
In [25]:
norm_grouped[(norm_grouped['machine'] == '192.168.140.82') & (norm_grouped.limits =='without') & (norm_grouped.normalized > 18)]
Out[25]:
In [26]:
maxes = norm_grouped.groupby(['machine', 'limits']).max()
maxes.reset_index(inplace=True)
maxes.rename(columns={'normalized': 'normalized_max'}, inplace=True)
mines = norm_grouped.groupby(['machine', 'limits']).min()
mines.reset_index(inplace=True)
mines.rename(columns={'normalized': 'normalized_min'}, inplace=True)
mines.drop('benchmark', axis=1, inplace=True)
maxes.drop('benchmark', axis=1, inplace=True)
maxs_and_mins = pd.merge(maxes, mines, on=['machine','limits','class'])
maxs_and_mins['range'] = maxs_and_mins['normalized_max'] - maxs_and_mins['normalized_min']
maxs_and_mins
Out[26]:
In [28]:
norm_grouped.groupby(['machine', 'limits']).max()
Out[28]:
In [26]:
#plt.figure(figsize=(20,10))
bins=[.5, .55,.6,.65,.7,.75,.8,.85,.9,.95,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.55,1.6,1.65,1.7,1.75,1.8,1.85,1.9,1.95,2,3.25,3.5,3.75,4,4.25,4.5,4.75,5,6,7,8,9]
pred = ((norm_grouped['machine'] == 'issdm-6') & (norm_grouped['limits'] == 'without'))
ax = norm_grouped[pred].groupby('limits').normalized.hist(bins=50,xrot=90,figsize=(16,6),alpha=0.5)
#ticks = ax[0].set_xticks(np.arange(0,8,.1))
#ticks = ax[0].set_yticks(range(0,25))
plt.xlabel('Speedup (re-execution / original)')
plt.ylabel('Frequency (# of benchmarks)')
plt.savefig('without_limits.png', bbox_inches='tight', dpi=300)
In [29]:
#plt.figure(figsize=(20,10))
bins=[.5, .55,.6,.65,.7,.75,.8,.85,.9,.95,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.55,1.6,1.65,1.7,1.75,1.8,1.85,1.9,1.95,2,3.25,3.5,3.75,4,4.25,4.5,4.75,5,6,7,8,9]
pred = ((norm_grouped['machine'] == 'issdm-3') & (norm_grouped['limits'] != 'without'))
ax = norm_grouped[pred].groupby('limits').normalized.hist(bins=50,xrot=90,figsize=(16,6),alpha=0.5)
#ticks = ax[0].set_xticks(np.arange(0,8,.1))
#ticks = ax[0].set_yticks(range(0,25))
plt.xlabel('Speedup (re-execution / original)')
plt.ylabel('Frequency (# of benchmarks)')
plt.savefig('with_limits.png', bbox_inches='tight', dpi=300)
In [32]:
#plt.figure(figsize=(20,10))
bins=[.5, .55,.6,.65,.7,.75,.8,.85,.9,.95,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.55,1.6,1.65,1.7,1.75,1.8,1.85,1.9,1.95,2,3.25,3.5,3.75,4,4.25,4.5,4.75,5,6,7,8,9]
pred = ((norm_grouped['machine'] == 'issdm-6') & (norm_grouped['limits'] != 'without'))
ax = norm_grouped[pred].groupby('limits').normalized.hist(bins=50,xrot=90,figsize=(16,6),alpha=0.5)
#ticks = ax[0].set_xticks(np.arange(0,8,.1))
#ticks = ax[0].set_yticks(range(0,25))
plt.xlabel('Speedup (re-execution / original)')
plt.ylabel('Frequency (# of benchmarks)')
plt.savefig('with_limits.png', bbox_inches='tight', dpi=300)
In [27]:
#plt.figure(figsize=(20,10))
bins=[.5, .55,.6,.65,.7,.75,.8,.85,.9,.95,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.55,1.6,1.65,1.7,1.75,1.8,1.85,1.9,1.95,2,3.25,3.5,3.75,4,4.25,4.5,4.75,5,6,7,8,9]
pred=(
(norm_grouped['machine'] == 'issdm-3'))
ax = norm_grouped[pred].groupby('limits').normalized.hist(bins=np.arange(0,8,.1),xrot=90,figsize=(16,6),alpha=0.5)
plt.axvline(x=2.6,color='b',linewidth=3, alpha=0.5)
plt.axvline(x=.5,color='b',linewidth=3, alpha=0.5)
plt.axvline(x=7.2,color='g',linewidth=3, alpha=0.5)
plt.axvline(x=1.6,color='g',linewidth=3, alpha=0.5)
ticks = ax[0].set_xticks(np.arange(0,8,.1))
ticks = ax[0].set_yticks(range(0,17))
plt.xlabel('Speedup (re-execution / original)')
plt.ylabel('Frequency (# of benchmarks)')
#plt.savefig('benchmarks.png', bbox_inches='tight', dpi=300)
In [ ]:
norm_grouped[(norm_grouped['machine'] == '192.168.140.86') & (norm_grouped.limits == 'without') & (norm_grouped.normalized < 1.6)]