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]:
normalized
benchmark machine limits
stressng-cpu-bsearch issdm-3 quota-1000 7.918752
without 767.624948
issdm-6 quota-100 0.740705
without 760.068027
rackform1 quota-1001 6.534478
without 1517.313883
stressng-cpu-context issdm-3 quota-1000 3.484495
without 372.957666
issdm-6 quota-100 0.400206
without 405.262717
rackform1 quota-1001 1.117845
without 289.050363
stressng-cpu-cpu issdm-3 quota-1000 2.445788
without 2413.683345
issdm-6 quota-100 0.248324
without 2408.939166
rackform1 quota-1001 1.876317
without 5324.509726
stressng-cpu-crypt issdm-3 quota-1000 5.486145
without 566.861429
issdm-6 quota-100 0.521243
without 569.165343
rackform1 quota-1001 4.078258
without 929.899725
stressng-cpu-full issdm-3 quota-1000 4.955132
without 508.400706
issdm-6 quota-100 0.475704
without 512.893741
rackform1 quota-1001 2.943736
without 701.248194
stressng-cpu-hsearch issdm-3 quota-1000 9.747036
without 1069.157894
issdm-6 quota-100 0.685643
without 1015.006634
rackform1 quota-1001 9.486921
without 2419.552053
stressng-cpu-longjmp issdm-3 quota-1000 7.840187
without 801.832767
issdm-6 quota-100 0.765680
without 801.912433
rackform1 quota-1001 5.818498
without 1350.085952
stressng-cpu-lsearch issdm-3 quota-1000 3.015935
without 132.308324
issdm-6 quota-100 2.366341
without 132.276732
rackform1 quota-1001 3.076227
without 175.369355
stressng-cpu-malloc issdm-3 quota-1000 3.358470
without 977.570416
issdm-6 quota-100 0.241802
without 994.337423
rackform1 quota-1001 3.435167
without 2166.872853
stressng-cpu-matrix issdm-3 quota-1000 69.287564
without 6977.717259
issdm-6 quota-100 8.096737
without 6981.876014
rackform1 quota-1001 39.421328
without 9060.009838
stressng-cpu-memcpy issdm-3 quota-1000 6.053621
without 603.053748
issdm-6 quota-100 0.593870
without 628.091607
rackform1 quota-1001 14.242457
without 3350.842464
stressng-cpu-mincore issdm-3 quota-1000 6.746017
without 714.042576
issdm-6 quota-100 0.578657
without 575.960584
rackform1 quota-1001 2.586468
without 698.089908
stressng-cpu-null issdm-3 quota-1000 6.707432
without 639.000464
issdm-6 quota-100 0.516506
without 631.948560
rackform1 quota-1001 2.215097
without 592.513767
stressng-cpu-pipe issdm-3 quota-1000 3.035646
without 691.711985
issdm-6 quota-100 0.219369
without 302.598792
rackform1 quota-1001 1.466216
without 562.047737
stressng-cpu-remap issdm-3 quota-1000 9.250959
without 936.621828
issdm-6 quota-100 0.973374
without 935.539072
rackform1 quota-1001 2.070695
without 501.889028
stressng-cpu-str issdm-3 quota-1000 13.414546
without 1362.434173
issdm-6 quota-100 1.355998
without 1378.520456
rackform1 quota-1001 15.505646
without 3838.397029
stressng-cpu-stream issdm-3 quota-1000 10.899432
without 2009.771007
issdm-6 quota-100 0.476926
without 2006.274558
rackform1 quota-1001 0.568964
without 644.129042
stressng-cpu-tlb-shootdown issdm-3 quota-1000 1.133308
without 364.709091
rackform1 quota-1001 1.058854
without 633.396021
stressng-cpu-tsearch issdm-3 quota-1000 2.423723
without 218.668952
issdm-6 quota-100 0.340945
without 216.606528
rackform1 quota-1001 2.028017
without 432.600850
stressng-cpu-vecmath issdm-3 quota-1000 9.357258
without 954.476359
issdm-6 quota-100 0.880890
without 955.083900
rackform1 quota-1001 14.254576
without 3432.896208
stressng-cpu-wcs issdm-3 quota-1000 9.687612
without 986.365632
issdm-6 quota-100 0.940167
without 982.585103
rackform1 quota-1001 7.474083
without 1759.247040
stressng-cpu-zero issdm-3 quota-1000 2.353361
without 240.534538
issdm-6 quota-100 0.276102
without 300.980569
rackform1 quota-1001 1.686319
without 360.895219

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]:
65

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]:
3

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]:
62

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]:
0

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]:
array(['stressng-cpu-bsearch', 'stressng-cpu-context', 'stressng-cpu-cpu',
       'stressng-cpu-crypt', 'stressng-cpu-full', 'stressng-cpu-hsearch',
       'stressng-cpu-longjmp', 'stressng-cpu-lsearch',
       'stressng-cpu-malloc', 'stressng-cpu-matrix', 'stressng-cpu-memcpy',
       'stressng-cpu-mincore', 'stressng-cpu-null', 'stressng-cpu-pipe',
       'stressng-cpu-remap', 'stressng-cpu-str', 'stressng-cpu-stream',
       'stressng-cpu-tlb-shootdown', 'stressng-cpu-tsearch',
       'stressng-cpu-vecmath', 'stressng-cpu-wcs', 'stressng-cpu-zero'], dtype=object)

In [16]:
len(df.benchmark.unique())


Out[16]:
22

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]:
normalized
machine limits class
issdm-3 quota-1000 cpu 7.474131
memory 10.816794
without cpu 1025.795522
memory 1199.015711
issdm-6 quota-100 cpu 0.841841
memory 1.253721
without cpu 1021.868365
memory 1239.445127
rackform1 quota-1001 cpu 6.412017
memory 7.326635
without cpu 1981.117574
memory 1898.913331

In [20]:
norm_grouped.copy().groupby(['machine', 'limits', 'class'])['normalized'].median().to_frame()


Out[20]:
normalized
machine limits class
issdm-3 quota-1000 cpu 7.918752
memory 5.504377
without cpu 954.476359
memory 665.356224
issdm-6 quota-100 cpu 0.740705
memory 0.516506
without cpu 955.083900
memory 628.091607
rackform1 quota-1001 cpu 5.818498
memory 2.400783
without cpu 1517.313883
memory 665.742965

In [21]:
norm_grouped[(norm_grouped.normalized > .83) & (norm_grouped.normalized < .93)].copy().groupby(['machine', 'limits', 'class'])['normalized'].count().to_frame()


Out[21]:
normalized
machine limits class
issdm-6 quota-100 cpu 1

In [22]:
pd.unique(norm_grouped['class'])


Out[22]:
array(['cpu', 'memory'], dtype=object)

In [23]:
df[(df['machine'] == 'nibbler.soe.ucsc.edu') & (df['benchmark'] == 'stressng-cpu-bitops')]


Out[23]:
benchmark base_result machine limits class lower_is_better repetition result normalized

In [24]:
pd.unique(norm_grouped.machine)


Out[24]:
array(['issdm-3', 'issdm-6', 'rackform1'], dtype=object)

In [25]:
norm_grouped[(norm_grouped['machine'] == '192.168.140.82') & (norm_grouped.limits =='without') & (norm_grouped.normalized > 18)]


Out[25]:
benchmark machine limits class normalized

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]:
machine limits class normalized_max normalized_min range

In [28]:
norm_grouped.groupby(['machine', 'limits']).max()


Out[28]:
benchmark class normalized
machine limits
issdm-3 quota-1000 stressng-cpu-zero memory 69.287564
without stressng-cpu-zero memory 6977.717259
issdm-6 quota-100 stressng-cpu-zero memory 8.096737
without stressng-cpu-zero memory 6981.876014
rackform1 quota-1001 stressng-cpu-zero memory 39.421328
without stressng-cpu-zero memory 9060.009838

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)]