From 4be698eb92e595960bef604aec3451e723d43bd1 Mon Sep 17 00:00:00 2001
From: rschoene <rene.schoene@tu-dresden.de>
Date: Thu, 22 Oct 2015 17:15:34 +0200
Subject: [PATCH] WIP: again towards working graph creation

---
 ilp-measurement.ipynb | 191 +++++++++++++++++++++++++++++++++---------
 ilp_measurement.py    |  15 +++-
 scheme.properties     |   4 +-
 3 files changed, 166 insertions(+), 44 deletions(-)

diff --git a/ilp-measurement.ipynb b/ilp-measurement.ipynb
index 230d618..2959b96 100644
--- a/ilp-measurement.ipynb
+++ b/ilp-measurement.ipynb
@@ -89,13 +89,15 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 6,
+   "execution_count": 163,
    "metadata": {
     "collapsed": false
    },
    "outputs": [],
    "source": [
     "def get_average_times(dat, dirCol, stepCol, timeCol):\n",
+    "    if dat.size == 1:\n",
+    "        return np.array([np.array([dat.item()[timeCol]])])\n",
     "    dat.sort(order=['dir', 'step'])\n",
     "    result = {}\n",
     "    for (c_dir, c_step), rows in groupby(dat, key=set_keys('dir','step')):\n",
@@ -112,12 +114,34 @@
     "    result2 = []\n",
     "    for c_dir, rows in result.iteritems():\n",
     "        inner = []\n",
-    "        for row in rows:\n",
-    "            inner.append(row[1])\n",
-    "        result2.append(inner)\n",
+    "        result2.append([row[1] for row in rows])\n",
+    "#        for row in rows:\n",
+    "#            inner.append(row[1])\n",
+    "#        result2.append(inner)\n",
     "    return np.array([np.array(rows) for rows in result2])"
    ]
   },
+  {
+   "cell_type": "code",
+   "execution_count": 100,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "gen (8, 31)\n",
+      "sol (8, 23)\n"
+     ]
+    }
+   ],
+   "source": [
+    "print 'gen', larceny_dats['update']['normal'].shape\n",
+    "print 'sol', glpk_dats['update'].shape"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": 7,
@@ -160,14 +184,16 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 58,
+   "execution_count": 165,
    "metadata": {
-    "collapsed": true
+    "collapsed": false
    },
    "outputs": [],
    "source": [
     "no_split, split_change_only, split_both = 0, 1, 2\n",
+    "dat, dat2, dat3 = None, None, None\n",
     "def read_single_result(f, name, dtype, data_column, since):\n",
+    "    global dat, dat2, dat3\n",
     "    def convdate(text):\n",
     "        return datetime.strptime(text, '%Y-%m-%dT%H:%M:%S.%f')\n",
     "    def convdir(text):\n",
@@ -181,11 +207,13 @@
     "    if since:\n",
     "        dat = dat[dat['timestamp'] > since ]\n",
     "    dat2 = get_average_times(dat, 1, 2, data_column).transpose()\n",
+    "    len_dat = 1 if len(dat.shape) == 0 else len(dat)\n",
     "    if dat2.size == 0:\n",
     "        print 'Did not load any record for {}'.format(name)\n",
     "    else:\n",
     "        print 'Loaded {0} records for {1} ({2[0]}x{2[1]} unique) ~= {3} run(s)'.format(\n",
-    "            len(dat), name, dat2.shape, safe_div(len(dat),dat2.size))\n",
+    "            len_dat, name, dat2.shape, safe_div(len_dat,dat2.size))\n",
+    "    dat3 = dat2\n",
     "    return dat2\n",
     "\n",
     "def read_results(prefix, name, dtype, data_column, since, splitted = no_split):\n",
@@ -295,10 +323,10 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 60,
+   "execution_count": 166,
    "metadata": {
     "collapsed": false,
-    "scrolled": true
+    "scrolled": false
    },
    "outputs": [
     {
@@ -314,7 +342,7 @@
       "Loaded 63 records for res_normal_plt-r6rs (7x4 unique) ~= 2 run(s)\n",
       "Loaded 28 records for res_flush_plt-r6rs (7x4 unique) ~= 1 run(s)\n",
       "Loaded 147 records for res_noncached_plt-r6rs (7x14 unique) ~= 1 run(s)\n",
-      "Did not load any record for update_normal_larceny\n",
+      "Loaded 264 records for update_normal_larceny (8x31 unique) ~= 1 run(s)\n",
       "Did not load any record for update_flush_larceny\n",
       "Did not load any record for update_noncached_larceny\n",
       "Did not load any record for sw_normal_larceny\n",
@@ -323,15 +351,15 @@
       "Did not load any record for res_normal_larceny\n",
       "Did not load any record for res_flush_larceny\n",
       "Did not load any record for res_noncached_larceny\n",
-      "Did not load any record for update_normal_java\n",
-      "Did not load any record for update_flush_java\n",
-      "Did not load any record for update_noncached_java\n",
-      "Did not load any record for sw_normal_java\n",
-      "Did not load any record for sw_flush_java\n",
-      "Did not load any record for sw_noncached_java\n",
-      "Did not load any record for res_normal_java\n",
-      "Did not load any record for res_flush_java\n",
-      "Did not load any record for res_noncached_java\n"
+      "Loaded 88 records for update_normal_java (1x31 unique) ~= 2 run(s)\n",
+      "Loaded 1 records for update_flush_java (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for update_noncached_java (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for sw_normal_java (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for sw_flush_java (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for sw_noncached_java (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for res_normal_java (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for res_flush_java (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for res_noncached_java (1x1 unique) ~= 1 run(s)\n"
      ]
     }
    ],
@@ -343,7 +371,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 61,
+   "execution_count": 167,
    "metadata": {
     "collapsed": false,
     "scrolled": true
@@ -357,11 +385,11 @@
       "Did not load any record for sw_java\n",
       "Did not load any record for res_java\n",
       "Loaded 1656 records for update_glpk (8x23 unique) ~= 9 run(s)\n",
-      "Did not load any record for sw_glpk\n",
-      "Did not load any record for res_glpk\n",
-      "Did not load any record for update_gurobi\n",
-      "Did not load any record for sw_gurobi\n",
-      "Did not load any record for res_gurobi\n"
+      "Loaded 1 records for sw_glpk (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for res_glpk (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 216 records for update_gurobi (8x27 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for sw_gurobi (1x1 unique) ~= 1 run(s)\n",
+      "Loaded 1 records for res_gurobi (1x1 unique) ~= 1 run(s)\n"
      ]
     }
    ],
@@ -386,16 +414,16 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 64,
+   "execution_count": 70,
    "metadata": {
     "collapsed": false,
     "scrolled": false
    },
    "outputs": [],
    "source": [
-    "def draw_gen(params):\n",
+    "def draw_gen(changeName, strategy, params):\n",
     "    # needed number of axes equals ax_nr+1 now\n",
-    "    name = 'gen_{}'.format(changeName)\n",
+    "    name = 'gen_{0}_{1}'.format(changeName, strategy)\n",
     "    f, ax_arr = plt.subplots(nrows = ax_nr+1, ncols = 3, sharex=True, sharey=True)\n",
     "    f.set_size_inches(25.5,3.5*(ax_nr+1))\n",
     "    one_plot = ax_arr.shape[1] == 1\n",
@@ -445,7 +473,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 65,
+   "execution_count": 71,
    "metadata": {
     "collapsed": false
    },
@@ -498,7 +526,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 66,
+   "execution_count": 72,
    "metadata": {
     "collapsed": false,
     "scrolled": true
@@ -524,12 +552,21 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 68,
+   "execution_count": 168,
    "metadata": {
     "collapsed": false,
     "scrolled": true
    },
    "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Change = update\n",
+      "Stategy = normal\n",
+      "Stategy = flush\n"
+     ]
+    },
     {
      "ename": "IndexError",
      "evalue": "too many indices for array",
@@ -537,7 +574,7 @@
      "traceback": [
       "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
       "\u001b[1;31mIndexError\u001b[0m                                Traceback (most recent call last)",
-      "\u001b[1;32m<ipython-input-68-e8120160290e>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m     16\u001b[0m             gen_params.append([ax_nr, line_def[i], color_def[i], '{2:d} x ({4}*{5}*{6})'.format(*specs[i]),\n\u001b[0;32m     17\u001b[0m                                \u001b[0msafe\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mracket_dats\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mchange\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mstrategy\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mSTART_STEP\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 18\u001b[1;33m                                \u001b[0msafe\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlarceny_dats\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mchange\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mstrategy\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mSTART_STEP\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     19\u001b[0m                                safe(java_dat[change][strategy],i)])\n\u001b[0;32m     20\u001b[0m             \u001b[0mlast_res\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcurrent_res\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+      "\u001b[1;32m<ipython-input-168-4ac34798cab4>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m     18\u001b[0m             gen_params.append([ax_nr, line_def[i], color_def[i], '{2:d} x ({4}*{5}*{6})'.format(*specs[i]),\n\u001b[0;32m     19\u001b[0m                                \u001b[0msafe\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mracket_dats\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mchange\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mstrategy\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mSTART_STEP\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 20\u001b[1;33m                                \u001b[0msafe\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlarceny_dats\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mchange\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mstrategy\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mSTART_STEP\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     21\u001b[0m                                safe(java_dats[change][strategy],i)])\n\u001b[0;32m     22\u001b[0m             \u001b[0mlast_res\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcurrent_res\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
       "\u001b[1;32m<ipython-input-10-27c199385393>\u001b[0m in \u001b[0;36msafe\u001b[1;34m(a, i, start)\u001b[0m\n\u001b[0;32m      3\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0ma\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mstart\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      4\u001b[0m     \u001b[1;32mexcept\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mzeros\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msize\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
       "\u001b[1;31mIndexError\u001b[0m: too many indices for array"
      ]
@@ -546,7 +583,9 @@
    "source": [
     "START_STEP, MAX_PLOTS_IN_ONE = 0, 7\n",
     "for change in kinds['changes']:\n",
+    "    print 'Change = {}'.format(change)\n",
     "    for strategy in kinds['strategies']:\n",
+    "        print 'Stategy = {}'.format(strategy)\n",
     "        current_plot, ax_nr, last_res = 0, 0, -1\n",
     "        gen_params = []\n",
     "        for i in xrange(len(specs)):\n",
@@ -556,16 +595,16 @@
     "                ax_nr += 1\n",
     "                current_plot = 0\n",
     "#            params.append([ax_nr, safe(racket_dats[change][strategy],i,START_STEP), safe(larceny_dats[change][strategy],i,START_STEP),\n",
-    "#                           safe(glpk_dat[change][strategy],i), safe(gurobi_dat[change][strategy],i),\n",
+    "#                           safe(glpk_dats[change][strategy],i), safe(gurobi_dats[change][strategy],i),\n",
     "#                           line_def[i], color_def[i], '{2:d} x ({4}*{5}*{6})'.format(*specs[i]),\n",
-    "#                           safe(java_dat[change][strategy],i), safe(java_glpk_dat[change][strategy],i)])\n",
+    "#                           safe(java_dats[change][strategy],i), safe(java_glpk_dats[change][strategy],i)])\n",
     "            gen_params.append([ax_nr, line_def[i], color_def[i], '{2:d} x ({4}*{5}*{6})'.format(*specs[i]),\n",
     "                               safe(racket_dats[change][strategy],i,START_STEP),\n",
     "                               safe(larceny_dats[change][strategy],i,START_STEP),\n",
-    "                               safe(java_dat[change][strategy],i)])\n",
+    "                               safe(java_dats[change][strategy],i)])\n",
     "            last_res = current_res\n",
     "        try:\n",
-    "            draw_gen(gen_params)\n",
+    "            draw_gen(change, strategy, gen_params)\n",
     "        except:\n",
     "            print 'Error while drawing gen in {0}-{1}'.format(change, strategy)\n",
     "    sol_params = []\n",
@@ -576,19 +615,89 @@
     "            ax_nr += 1\n",
     "            current_plot = 0\n",
     "        sol_params.append([ax_nr, line_def[i], color_def[i], '{2:d} x ({4}*{5}*{6})'.format(*specs[i]),\n",
-    "                           safe(glpk_dat[change][strategy],i),\n",
-    "                           safe(gurobi_dat[change][strategy],i),\n",
-    "                           safe(java_glpk_dat[change][strategy],i)])\n",
+    "                           safe(glpk_dats[change][strategy],i),\n",
+    "                           safe(gurobi_dats[change][strategy],i),\n",
+    "                           safe(java_glpk_dats[change][strategy],i)])\n",
     "    try:\n",
-    "        draw_sol(params)\n",
+    "        draw_sol(change, params)\n",
     "    except:\n",
     "        print 'Error while drawing sol in {0}-{1}'.format(change, strategy)\n",
     "    try:\n",
-    "        draw_comp_sol(params)\n",
+    "        draw_comp_sol(change, params)\n",
     "    except:\n",
     "        print 'Error while drawing comp-sol in {0}-{1}'.format(change, strategy)\n"
    ]
   },
+  {
+   "cell_type": "code",
+   "execution_count": 82,
+   "metadata": {
+    "collapsed": false,
+    "scrolled": true
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "{u'res': {u'flush': array([], dtype=float64),\n",
+       "  u'noncached': array([], dtype=float64),\n",
+       "  u'normal': array([], dtype=float64)},\n",
+       " u'sw': {u'flush': array([], dtype=float64),\n",
+       "  u'noncached': array([], dtype=float64),\n",
+       "  u'normal': array([], dtype=float64)},\n",
+       " u'update': {u'flush': array([], dtype=float64),\n",
+       "  u'noncached': array([], dtype=float64),\n",
+       "  u'normal': array([[  0.17  ,   0.187 ,   1.766 ,  11.3   ,   0.3   ,   0.403 ,\n",
+       "            3.304 ,  22.73  ,   1.439 ,   2.375 ,   3.521 ,   6.308 ,\n",
+       "           10.359 ,  12.319 ,  15.182 ,  18.13  ,  22.5205,  27.992 ,\n",
+       "           32.143 ,  25.217 ,  30.606 ,  38.144 ,  45.88  ,   4.294 ,\n",
+       "            9.545 ,  16.402 ,  24.272 ,   0.362 ,   0.711 ,   1.518 ,   3.948 ],\n",
+       "         [  0.5   ,   0.46  ,   0.223 ,   0.916 ,   0.9   ,   0.123 ,\n",
+       "            0.446 ,   2.267 ,   0.257 ,   0.488 ,   0.852 ,   1.224 ,\n",
+       "            1.964 ,   2.78  ,   2.6   ,   3.274 ,   4.2555,   5.503 ,\n",
+       "            4.899 ,   4.107 ,   4.98  ,   6.655 ,   7.133 ,   0.958 ,\n",
+       "            1.695 ,   2.673 ,   3.984 ,   0.68  ,   0.142 ,   0.239 ,   0.649 ],\n",
+       "         [  0.5   ,   0.45  ,   0.228 ,   0.915 ,   0.1   ,   0.117 ,\n",
+       "            0.441 ,   2.266 ,   0.261 ,   0.489 ,   0.879 ,   1.255 ,\n",
+       "            1.953 ,   2.79  ,   2.602 ,   3.252 ,   3.577 ,   5.444 ,\n",
+       "            4.878 ,   4.54  ,   4.959 ,   6.679 ,   7.165 ,   0.949 ,\n",
+       "            1.507 ,   2.679 ,   3.977 ,   0.73  ,   0.141 ,   0.241 ,   0.65  ],\n",
+       "         [  0.5   ,   0.43  ,   0.225 ,   0.902 ,   0.11  ,   0.115 ,\n",
+       "            0.443 ,   2.256 ,   0.25  ,   0.488 ,   0.858 ,   1.209 ,\n",
+       "            1.958 ,   2.93  ,   2.636 ,   3.272 ,   3.5695,   5.444 ,\n",
+       "            4.8705,   4.77  ,   4.979 ,   6.732 ,   7.151 ,   0.937 ,\n",
+       "            1.52  ,   2.692 ,   3.995 ,   0.68  ,   0.147 ,   0.231 ,   0.675 ],\n",
+       "         [  0.4   ,   0.28  ,   0.35  ,   0.83  ,   0.6   ,   0.64  ,\n",
+       "            0.8   ,   0.225 ,   0.129 ,   0.222 ,   0.263 ,   0.525 ,\n",
+       "            0.714 ,   0.919 ,   1.202 ,   1.385 ,   1.607 ,   1.866 ,\n",
+       "            1.475 ,   1.88  ,   2.163 ,   2.395 ,   2.83  ,   0.326 ,\n",
+       "            0.862 ,   1.473 ,   2.274 ,   0.26  ,   0.62  ,   0.178 ,   0.253 ],\n",
+       "         [  0.5   ,   0.39  ,   0.45  ,   0.102 ,   0.1   ,   0.87  ,\n",
+       "            0.171 ,   0.27  ,   0.162 ,   0.272 ,   0.359 ,   0.636 ,\n",
+       "            0.952 ,   1.311 ,   1.965 ,   2.199 ,   2.3975,   3.42  ,\n",
+       "            2.397 ,   2.855 ,   2.935 ,   3.413 ,   4.4   ,   0.534 ,\n",
+       "            1.105 ,   2.147 ,   2.773 ,   0.44  ,   0.8   ,   0.145 ,   0.381 ],\n",
+       "         [  0.5   ,   0.39  ,   0.14  ,   0.153 ,   0.1   ,   0.12  ,\n",
+       "            0.103 ,   0.257 ,   0.186 ,   0.253 ,   0.42  ,   0.852 ,\n",
+       "            0.945 ,   1.319 ,   1.926 ,   1.779 ,   2.23  ,   2.445 ,\n",
+       "            2.262 ,   2.565 ,   2.833 ,   3.318 ,   3.743 ,   0.456 ,\n",
+       "            1.298 ,   1.967 ,   2.767 ,   0.46  ,   0.77  ,   0.162 ,   0.334 ],\n",
+       "         [  0.4   ,   0.4   ,   0.51  ,   0.144 ,   0.9   ,   0.8   ,\n",
+       "            0.135 ,   0.36  ,   0.162 ,   0.443 ,   0.343 ,   0.681 ,\n",
+       "            0.933 ,   1.357 ,   1.623 ,   1.834 ,   2.4315,   2.626 ,\n",
+       "            2.098 ,   2.467 ,   2.755 ,   4.685 ,   3.96  ,   0.542 ,\n",
+       "            1.199 ,   2.159 ,   2.642 ,   0.38  ,   0.93  ,   0.151 ,   0.331 ]])}}"
+      ]
+     },
+     "execution_count": 82,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "larceny_dats"
+   ]
+  },
   {
    "cell_type": "markdown",
    "metadata": {},
diff --git a/ilp_measurement.py b/ilp_measurement.py
index a589a6f..7e43d83 100644
--- a/ilp_measurement.py
+++ b/ilp_measurement.py
@@ -297,8 +297,18 @@ def clean(dryrun = False):
     total += secure_remove({'profiling/splitted': ['*.csv']}, globbing = True, dryrun = dryrun)
     print 'Removed {} files.'.format(total)
 
+dummy_values = {'timestamp': '1970-01-01T00:00:00.00', 'dir': 'dummy-001', 'step': '01-dummy', 'attname': 'dummyatt'}
+
 @task(name = 'distinction-of-changes')
 def change_distinction():
+    def maybe_insert_dummy(f):
+        with open(f, 'a+') as fd:
+            header = next(fd)
+            if not next(fd, False):
+                # insert dummy data
+                keys = (key.strip() for key in header.split(','))
+                values = [dummy_values.get(key, '0') for key in keys]
+                fd.write(','.join(values))
     with open(change_kinds) as fd:
         d = json.load(fd)
     unnormal = '-v -e ' + ' -e '.join((c for c in d['strategies'] if c != 'normal'))
@@ -313,6 +323,7 @@ def change_distinction():
             sol_target = 'profiling/splitted/sol_{0}_{1}.csv'.format(change, sol_name)
             local_quiet('tail -n +2 profiling/sol-header > {0}'.format(sol_target))
             local_quiet('tail -n +2 {0} | grep -e {1} | cat >> {2}'.format(f, change, sol_target))
+            maybe_insert_dummy(sol_target)
 
         # att percentages (only per change kinds)
         f = 'profiling/att-percentages.csv'
@@ -320,6 +331,7 @@ def change_distinction():
         local_quiet('head -n 1 profiling/att-percentages.csv > {}'.format(target))
         local_quiet('tail -n +2 {0} | grep -e {1} | cat >> {2}'.format(
             f, change, target))
+        maybe_insert_dummy(target)
 
         for strategy in d['strategies']:
             sys.stdout.write('.')
@@ -330,13 +342,14 @@ def change_distinction():
                 shutil.copy('profiling/gen-header', gen_target)
                 local_quiet('tail -n +2 {0} | grep -e {1} | grep {2} | cat >> {3}'.format(
                     f, change, get_strategy_pattern(strategy), gen_target))
+                maybe_insert_dummy(gen_target)
             # att totals
             f = 'profiling/all-att-results.csv'
             target = 'profiling/splitted/att_{0}_{1}.csv'.format(change, strategy)
             local_quiet('head -n 1 profiling/att-totals.csv > {}'.format(target))
             local_quiet('tail -n +2 {0} | grep -e {1} | grep {2} | cat >> {3}'.format(
                 f, change, get_strategy_pattern(strategy), target))
-
+            maybe_insert_dummy(target)
 
 @task(name = 'prepare-noncached')
 def prepare_noncached():
diff --git a/scheme.properties b/scheme.properties
index b61fe58..2fb18ca 100644
--- a/scheme.properties
+++ b/scheme.properties
@@ -5,6 +5,6 @@ timing              = 0
 log.info            = 1
 log.debug           = 0
 measure.lp.write    = 0
-measure.profiling   = 0
-measure.flush       = 1
+measure.profiling   = 1
+measure.flush       = 0
 measure.non-chached = 0
-- 
GitLab