Commit 19afb41f authored by Andreas Schmidt's avatar Andreas Schmidt

Remove jitter.prep. Add correlation export. Small fixes.

parent 123504b6
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"import logging\n", "import logging\n",
...@@ -29,10 +27,12 @@ ...@@ -29,10 +27,12 @@
"import ipywidgets as widgets\n", "import ipywidgets as widgets\n",
"from xlap.parse import evaluate, evaluate_side, parse_config\n", "from xlap.parse import evaluate, evaluate_side, parse_config\n",
"import xlap.analyse.jitter as jitter\n", "import xlap.analyse.jitter as jitter\n",
"from xlap.analyse.cdf import multi_cdf\n",
"from xlap.analyse.regress import linear as linear_regression\n", "from xlap.analyse.regress import linear as linear_regression\n",
"from xlap.analyse.trace import traces\n", "from xlap.analyse.trace import traces\n",
"from xlap.analyse.correlation import correlation\n", "from xlap.analyse.correlation import correlation, multi_correlation\n",
"from xlap.analyse.latency import analyse\n", "from xlap.analyse.latency import analyse\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n", "import pandas as pd\n",
"%matplotlib inline" "%matplotlib inline"
] ]
...@@ -51,8 +51,17 @@ ...@@ -51,8 +51,17 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"config = parse_config()\n", "config = parse_config()\n",
"data_files = config[\"data_files\"]\n", "data_files = {\n",
"original = evaluate(data_files[\"sender\"], data_files[\"receiver\"], config=config, kind=0)" " \"sender\": \"~/Work/Publications/rtn-2018/eval/20180417_testbed/\",\n",
" \"receiver\": \"~/Work/Publications/rtn-2018/eval/20180417_testbed/\"\n",
"}\n",
"original1 = evaluate(data_files[\"sender\"] + \"sender-1000000.csv\", data_files[\"receiver\"] + \"receiver-1000000.csv\", config=config, kind=0)\n",
"original1.name = \"1GHz\"\n",
"original2 = evaluate(data_files[\"sender\"] + \"sender-2000000.csv\", data_files[\"receiver\"] + \"receiver-2000000.csv\", config=config, kind=0)\n",
"original2.name = \"2GHz\"\n",
"original3 = evaluate(data_files[\"sender\"] + \"sender-3000000.csv\", data_files[\"receiver\"] + \"receiver-3000000.csv\", config=config, kind=0)\n",
"original3.name = \"3GHz\"\n",
"dfs = [original1, original2, original3]"
] ]
}, },
{ {
...@@ -68,7 +77,7 @@ ...@@ -68,7 +77,7 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"traces(original, config)" "traces(original1, config)"
] ]
}, },
{ {
...@@ -84,8 +93,28 @@ ...@@ -84,8 +93,28 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"df = jitter.prep(original, config=config)\n", "def multi_trace_jitter(dfs, config):\n",
"jitter.trace_jitter(df, threshold=500)" " for df in dfs:\n",
" print(\"############################ {} ############################\".format(df.name))\n",
" jitter.trace_jitter(df, config=config, threshold=300)\n",
" \n",
"multi_trace_jitter(dfs, config)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## CDFs"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"multi_cdf(dfs, config, export=True)"
] ]
}, },
{ {
...@@ -101,7 +130,7 @@ ...@@ -101,7 +130,7 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"correlation(df[df[\"EndToEnd_D\"] < 500], config)" "multi_correlation(dfs, config, export=True)"
] ]
}, },
{ {
...@@ -119,7 +148,7 @@ ...@@ -119,7 +148,7 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"d = analyse(original, config)" "d = analyse(original1, config)"
] ]
}, },
{ {
...@@ -153,6 +182,65 @@ ...@@ -153,6 +182,65 @@
"source": [ "source": [
"d.cfg" "d.cfg"
] ]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Kolmogorov\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from scipy import stats\n",
"from xlap.analyse.util import extract_durations\n",
"import numpy as np\n",
"\n",
"def timing_behaviour(df1, df2, config, confidence=0.9):\n",
" durations = [x + \"_D\" for x in extract_durations(config)]\n",
" \n",
" norm = lambda x: x / np.max(x)\n",
" \n",
" for duration in durations:\n",
" rvs1 = norm(df1[duration])\n",
" rvs2 = norm(df2[duration])\n",
" stat, pvalue = stats.ks_2samp(rvs1, rvs2)\n",
" result = \"CANNOT REJECT\"\n",
" if pvalue < 1 - confidence:\n",
" result = \"REJECT\"\n",
" print(duration.ljust(20), \"{:.6f}\".format(pvalue), result, sep=\"\\t\\t\")\n",
"\n",
"timing_behaviour(original1, original2, config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"timing_behaviour(original1, original3, config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"timing_behaviour(original2, original3, config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {
...@@ -171,7 +259,7 @@ ...@@ -171,7 +259,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.5.2" "version": "3.6.3"
}, },
"widgets": { "widgets": {
"state": { "state": {
......
...@@ -39,6 +39,14 @@ stamps: ...@@ -39,6 +39,14 @@ stamps:
Source: sender Source: sender
Thread: app_send Thread: app_send
Type: time Type: time
PrrtSendPacketStart:
Source: sender
Thread: trans_send
Type: none
PrrtSendPacketEnd:
Source: sender
Thread: trans_send
Type: none
PrrtTransmitStart: PrrtTransmitStart:
Source: sender Source: sender
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment