|
|
|
@ -9,7 +9,7 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 4,
|
|
|
|
|
"execution_count": 2,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
@ -34,7 +34,7 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 5,
|
|
|
|
|
"execution_count": 3,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
@ -44,7 +44,7 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 24,
|
|
|
|
|
"execution_count": 4,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
@ -89,7 +89,7 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 18,
|
|
|
|
|
"execution_count": 6,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
@ -101,7 +101,7 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 19,
|
|
|
|
|
"execution_count": 7,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
@ -1305,44 +1305,327 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 35,
|
|
|
|
|
"execution_count": 94,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
|
|
|
|
"0\n",
|
|
|
|
|
"1\n",
|
|
|
|
|
"2\n",
|
|
|
|
|
"3\n",
|
|
|
|
|
"4\n",
|
|
|
|
|
"5\n",
|
|
|
|
|
"6\n",
|
|
|
|
|
"7\n",
|
|
|
|
|
"8\n",
|
|
|
|
|
"9\n"
|
|
|
|
|
"Executing file number 1 out of 10\n",
|
|
|
|
|
"Executing file number 2 out of 10\n",
|
|
|
|
|
"Executing file number 3 out of 10\n",
|
|
|
|
|
"Executing file number 4 out of 10\n",
|
|
|
|
|
"Executing file number 5 out of 10\n",
|
|
|
|
|
"Executing file number 6 out of 10\n",
|
|
|
|
|
"Executing file number 7 out of 10\n",
|
|
|
|
|
"Executing file number 8 out of 10\n",
|
|
|
|
|
"Executing file number 9 out of 10\n",
|
|
|
|
|
"Executing file number 10 out of 10\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"dfs = []\n",
|
|
|
|
|
"for i in range(10):\n",
|
|
|
|
|
" print(i)\n",
|
|
|
|
|
" print(\"Executing file number {} out of 10\".format(i+1))\n",
|
|
|
|
|
" df = create_df(\"log_256_{}.txt\".format(i+1))\n",
|
|
|
|
|
" dfs.append(df)"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 40,
|
|
|
|
|
"execution_count": 95,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"functions = ['Py_kgeneration', 'generate', 'fftma2', 'covariance', 'gasdev', 'fourt', 'cov_value', 'ran2', 'build_real', 'prebuild_gwn', 'clean_real', 'cgrid', 'length', 'maxfactor']\n",
|
|
|
|
|
"def merge_dfs(dfs):\n",
|
|
|
|
|
" functions = ['Py_kgeneration', 'generate', 'fftma2', 'covariance', 'gasdev', 'fourt', 'cov_value', 'ran2', 'build_real', 'prebuild_gwn', 'clean_real', 'cgrid', 'length', 'maxfactor']\n",
|
|
|
|
|
" df_final = pd.concat(dfs, join='inner').sort_values(by=('time', 'sum'), ascending=False) \n",
|
|
|
|
|
"\n",
|
|
|
|
|
" memory_min, memory_max, memory_median = [], [], []\n",
|
|
|
|
|
" time_min, time_max, time_mean, time_sum, time_count = [], [], [], [], []\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" for function in functions:\n",
|
|
|
|
|
" memory_min.append(df_final.loc[function, ('memory', 'min')].min())\n",
|
|
|
|
|
" time_min.append(df_final.loc[function, ('time', 'min')].min())\n",
|
|
|
|
|
" memory_max.append(df_final.loc[function, ('memory', 'max')].max())\n",
|
|
|
|
|
" time_max.append(df_final.loc[function, ('time', 'max')].max())\n",
|
|
|
|
|
" time_mean.append(df_final.loc[function, ('time', 'mean')].mean())\n",
|
|
|
|
|
" time_sum.append(df_final.loc[function, ('time', 'sum')].sum())\n",
|
|
|
|
|
" time_count.append(df_final.loc[function, ('time', 'count')].sum())\n",
|
|
|
|
|
" try:\n",
|
|
|
|
|
" memory_median.append(df_final.loc[function, ('memory', 'median')].median())\n",
|
|
|
|
|
" except:\n",
|
|
|
|
|
" memory_median.append(df_final.loc[function, ('memory', 'median')])\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" df = pd.DataFrame({('memory', 'min'): memory_min, ('memory', 'max'): memory_max, ('memory', 'median'): memory_median, ('time', 'min'): time_min, ('time', 'max'): time_max, ('time', 'mean'): time_mean, ('time', 'sum'): time_sum, ('time', 'count'): time_count})\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" df.index = functions\n",
|
|
|
|
|
" df.index.name = 'function'\n",
|
|
|
|
|
" return df"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 96,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
|
|
|
|
"text/html": [
|
|
|
|
|
"<div>\n",
|
|
|
|
|
"<style scoped>\n",
|
|
|
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
|
|
|
" vertical-align: middle;\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" .dataframe tbody tr th {\n",
|
|
|
|
|
" vertical-align: top;\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" .dataframe thead tr th {\n",
|
|
|
|
|
" text-align: left;\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
"\n",
|
|
|
|
|
" .dataframe thead tr:last-of-type th {\n",
|
|
|
|
|
" text-align: right;\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
"</style>\n",
|
|
|
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
|
|
|
" <thead>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th colspan=\"3\" halign=\"left\">memory</th>\n",
|
|
|
|
|
" <th colspan=\"5\" halign=\"left\">time</th>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th>max</th>\n",
|
|
|
|
|
" <th>median</th>\n",
|
|
|
|
|
" <th>min</th>\n",
|
|
|
|
|
" <th>count</th>\n",
|
|
|
|
|
" <th>max</th>\n",
|
|
|
|
|
" <th>mean</th>\n",
|
|
|
|
|
" <th>min</th>\n",
|
|
|
|
|
" <th>sum</th>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>function</th>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" <th></th>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </thead>\n",
|
|
|
|
|
" <tbody>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>Py_kgeneration</th>\n",
|
|
|
|
|
" <td>7421.6</td>\n",
|
|
|
|
|
" <td>7421.6</td>\n",
|
|
|
|
|
" <td>7421.6</td>\n",
|
|
|
|
|
" <td>1.0</td>\n",
|
|
|
|
|
" <td>1226.822575</td>\n",
|
|
|
|
|
" <td>1226.822575</td>\n",
|
|
|
|
|
" <td>1226.822575</td>\n",
|
|
|
|
|
" <td>1226.822575</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>generate</th>\n",
|
|
|
|
|
" <td>6691.7</td>\n",
|
|
|
|
|
" <td>6691.7</td>\n",
|
|
|
|
|
" <td>6691.7</td>\n",
|
|
|
|
|
" <td>1.0</td>\n",
|
|
|
|
|
" <td>959.799368</td>\n",
|
|
|
|
|
" <td>959.799368</td>\n",
|
|
|
|
|
" <td>959.799368</td>\n",
|
|
|
|
|
" <td>959.799368</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>fftma2</th>\n",
|
|
|
|
|
" <td>872.0</td>\n",
|
|
|
|
|
" <td>872.0</td>\n",
|
|
|
|
|
" <td>872.0</td>\n",
|
|
|
|
|
" <td>1.0</td>\n",
|
|
|
|
|
" <td>267.021516</td>\n",
|
|
|
|
|
" <td>267.021516</td>\n",
|
|
|
|
|
" <td>267.021516</td>\n",
|
|
|
|
|
" <td>267.021516</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>covariance</th>\n",
|
|
|
|
|
" <td>870.5</td>\n",
|
|
|
|
|
" <td>870.5</td>\n",
|
|
|
|
|
" <td>870.5</td>\n",
|
|
|
|
|
" <td>1.0</td>\n",
|
|
|
|
|
" <td>247.512194</td>\n",
|
|
|
|
|
" <td>247.512194</td>\n",
|
|
|
|
|
" <td>247.512194</td>\n",
|
|
|
|
|
" <td>247.512194</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>gasdev</th>\n",
|
|
|
|
|
" <td>8.7</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>-13.5</td>\n",
|
|
|
|
|
" <td>16777216.0</td>\n",
|
|
|
|
|
" <td>0.001358</td>\n",
|
|
|
|
|
" <td>0.000033</td>\n",
|
|
|
|
|
" <td>0.000000</td>\n",
|
|
|
|
|
" <td>564.182445</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>fourt</th>\n",
|
|
|
|
|
" <td>11.5</td>\n",
|
|
|
|
|
" <td>-1.4</td>\n",
|
|
|
|
|
" <td>-16.2</td>\n",
|
|
|
|
|
" <td>3.0</td>\n",
|
|
|
|
|
" <td>8.429829</td>\n",
|
|
|
|
|
" <td>6.378454</td>\n",
|
|
|
|
|
" <td>5.015006</td>\n",
|
|
|
|
|
" <td>19.135362</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>cov_value</th>\n",
|
|
|
|
|
" <td>0.7</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>-13.9</td>\n",
|
|
|
|
|
" <td>8855600.0</td>\n",
|
|
|
|
|
" <td>0.000437</td>\n",
|
|
|
|
|
" <td>0.000002</td>\n",
|
|
|
|
|
" <td>0.000001</td>\n",
|
|
|
|
|
" <td>21.579349</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>ran2</th>\n",
|
|
|
|
|
" <td>0.9</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>-0.8</td>\n",
|
|
|
|
|
" <td>21359556.0</td>\n",
|
|
|
|
|
" <td>0.000381</td>\n",
|
|
|
|
|
" <td>0.000002</td>\n",
|
|
|
|
|
" <td>0.000000</td>\n",
|
|
|
|
|
" <td>45.002553</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>build_real</th>\n",
|
|
|
|
|
" <td>-0.2</td>\n",
|
|
|
|
|
" <td>-0.2</td>\n",
|
|
|
|
|
" <td>-0.2</td>\n",
|
|
|
|
|
" <td>1.0</td>\n",
|
|
|
|
|
" <td>0.151968</td>\n",
|
|
|
|
|
" <td>0.151968</td>\n",
|
|
|
|
|
" <td>0.151968</td>\n",
|
|
|
|
|
" <td>0.151968</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>prebuild_gwn</th>\n",
|
|
|
|
|
" <td>6.5</td>\n",
|
|
|
|
|
" <td>6.5</td>\n",
|
|
|
|
|
" <td>6.5</td>\n",
|
|
|
|
|
" <td>1.0</td>\n",
|
|
|
|
|
" <td>0.108160</td>\n",
|
|
|
|
|
" <td>0.108160</td>\n",
|
|
|
|
|
" <td>0.108160</td>\n",
|
|
|
|
|
" <td>0.108160</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>clean_real</th>\n",
|
|
|
|
|
" <td>127.2</td>\n",
|
|
|
|
|
" <td>127.2</td>\n",
|
|
|
|
|
" <td>127.2</td>\n",
|
|
|
|
|
" <td>1.0</td>\n",
|
|
|
|
|
" <td>0.095267</td>\n",
|
|
|
|
|
" <td>0.095267</td>\n",
|
|
|
|
|
" <td>0.095267</td>\n",
|
|
|
|
|
" <td>0.095267</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>cgrid</th>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>1.0</td>\n",
|
|
|
|
|
" <td>0.000160</td>\n",
|
|
|
|
|
" <td>0.000160</td>\n",
|
|
|
|
|
" <td>0.000160</td>\n",
|
|
|
|
|
" <td>0.000160</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>length</th>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>3.0</td>\n",
|
|
|
|
|
" <td>0.000043</td>\n",
|
|
|
|
|
" <td>0.000034</td>\n",
|
|
|
|
|
" <td>0.000021</td>\n",
|
|
|
|
|
" <td>0.000102</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>maxfactor</th>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>5.0</td>\n",
|
|
|
|
|
" <td>0.000002</td>\n",
|
|
|
|
|
" <td>0.000002</td>\n",
|
|
|
|
|
" <td>0.000001</td>\n",
|
|
|
|
|
" <td>0.000008</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </tbody>\n",
|
|
|
|
|
"</table>\n",
|
|
|
|
|
"</div>"
|
|
|
|
|
],
|
|
|
|
|
"text/plain": [
|
|
|
|
|
" memory time \\\n",
|
|
|
|
|
" max median min count max mean \n",
|
|
|
|
|
"function \n",
|
|
|
|
|
"Py_kgeneration 7421.6 7421.6 7421.6 1.0 1226.822575 1226.822575 \n",
|
|
|
|
|
"generate 6691.7 6691.7 6691.7 1.0 959.799368 959.799368 \n",
|
|
|
|
|
"fftma2 872.0 872.0 872.0 1.0 267.021516 267.021516 \n",
|
|
|
|
|
"covariance 870.5 870.5 870.5 1.0 247.512194 247.512194 \n",
|
|
|
|
|
"gasdev 8.7 0.0 -13.5 16777216.0 0.001358 0.000033 \n",
|
|
|
|
|
"fourt 11.5 -1.4 -16.2 3.0 8.429829 6.378454 \n",
|
|
|
|
|
"cov_value 0.7 0.0 -13.9 8855600.0 0.000437 0.000002 \n",
|
|
|
|
|
"ran2 0.9 0.0 -0.8 21359556.0 0.000381 0.000002 \n",
|
|
|
|
|
"build_real -0.2 -0.2 -0.2 1.0 0.151968 0.151968 \n",
|
|
|
|
|
"prebuild_gwn 6.5 6.5 6.5 1.0 0.108160 0.108160 \n",
|
|
|
|
|
"clean_real 127.2 127.2 127.2 1.0 0.095267 0.095267 \n",
|
|
|
|
|
"cgrid 0.0 0.0 0.0 1.0 0.000160 0.000160 \n",
|
|
|
|
|
"length 0.0 0.0 0.0 3.0 0.000043 0.000034 \n",
|
|
|
|
|
"maxfactor 0.0 0.0 0.0 5.0 0.000002 0.000002 \n",
|
|
|
|
|
"\n",
|
|
|
|
|
"#df_final = pd.concat(dfs).sort_values(by=('time', 'sum'), ascending=False) "
|
|
|
|
|
" \n",
|
|
|
|
|
" min sum \n",
|
|
|
|
|
"function \n",
|
|
|
|
|
"Py_kgeneration 1226.822575 1226.822575 \n",
|
|
|
|
|
"generate 959.799368 959.799368 \n",
|
|
|
|
|
"fftma2 267.021516 267.021516 \n",
|
|
|
|
|
"covariance 247.512194 247.512194 \n",
|
|
|
|
|
"gasdev 0.000000 564.182445 \n",
|
|
|
|
|
"fourt 5.015006 19.135362 \n",
|
|
|
|
|
"cov_value 0.000001 21.579349 \n",
|
|
|
|
|
"ran2 0.000000 45.002553 \n",
|
|
|
|
|
"build_real 0.151968 0.151968 \n",
|
|
|
|
|
"prebuild_gwn 0.108160 0.108160 \n",
|
|
|
|
|
"clean_real 0.095267 0.095267 \n",
|
|
|
|
|
"cgrid 0.000160 0.000160 \n",
|
|
|
|
|
"length 0.000021 0.000102 \n",
|
|
|
|
|
"maxfactor 0.000001 0.000008 "
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"execution_count": 96,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"output_type": "execute_result"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"merge_dfs(dfs)"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|