Commit 956abea5 authored by Andreas Schmidt's avatar Andreas Schmidt

Merge branch 'develop'

parents 96a298a8 5ba62919
*.ipynb filter=nbstripout
*.ipynb diff=ipynb
build/
dist/
xlap.egg-info/
.ipynb_checkpoints/
\ No newline at end of file
.ipynb_checkpoints/
.venv/
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
jupyter = "*"
matplotlib = "*"
pandas = "*"
numpy = "*"
scipy = "*"
ruamel-yaml = "*"
scikit-learn = "*"
graphviz = "*"
jupyterlab = "*"
nbstripout = "*"
nbconvert = "*"
[requires]
python_version = "3.6"
This diff is collapsed.
......@@ -7,41 +7,48 @@
"# X-Lap in Action"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Imports"
"## Data Retrieval"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import logging\n",
"logger = logging.getLogger()\n",
"logger.setLevel(logging.DEBUG)\n",
"from ipywidgets import interact, interactive, fixed, interact_manual\n",
"import ipywidgets as widgets\n",
"from xlap.parse import evaluate, evaluate_side, parse_config\n",
"import xlap.analyse.jitter as jitter\n",
"from xlap.analyse.regress import linear as linear_regression\n",
"from xlap.analyse.trace import traces\n",
"from xlap.analyse.correlation import correlation\n",
"from xlap.analyse.latency import analyse\n",
"import pandas as pd\n",
"%matplotlib inline"
"from xlap.parse import evaluate, parse_config\n",
"config = parse_config()\n",
"data_files = {\n",
" \"sender\": \"rtn2018/20180417_testbed/\",\n",
" \"receiver\": \"rtn2018/20180417_testbed/\"\n",
"}\n",
"df_1GHz = evaluate(data_files[\"sender\"] + \"sender-1000000.csv\", data_files[\"receiver\"] + \"receiver-1000000.csv\", config=config, kind=0)\n",
"df_1GHz.name = \"1GHz\"\n",
"df_2GHz = evaluate(data_files[\"sender\"] + \"sender-2000000.csv\", data_files[\"receiver\"] + \"receiver-2000000.csv\", config=config, kind=0)\n",
"df_2GHz.name = \"2GHz\"\n",
"df_3GHz = evaluate(data_files[\"sender\"] + \"sender-3000000.csv\", data_files[\"receiver\"] + \"receiver-3000000.csv\", config=config, kind=0)\n",
"df_3GHz.name = \"3GHz\"\n",
"dfs = [df_1GHz, df_2GHz, df_3GHz]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data Retrieval"
"## Individual Packet Traces"
]
},
{
......@@ -50,16 +57,15 @@
"metadata": {},
"outputs": [],
"source": [
"config = parse_config()\n",
"data_files = config[\"data_files\"]\n",
"original = evaluate(data_files[\"sender\"], data_files[\"receiver\"], config=config, kind=0)"
"from xlap.analyse.trace import traces\n",
"traces(df_1GHz, config, global_xaxis=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Traces"
"## Trace Jitter Analysis"
]
},
{
......@@ -68,14 +74,15 @@
"metadata": {},
"outputs": [],
"source": [
"traces(original, config)"
"from xlap.analyse.jitter import multi_trace_jitter\n",
"multi_trace_jitter(dfs, config)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Jitter Analysis"
"## Latency Distributions"
]
},
{
......@@ -84,15 +91,25 @@
"metadata": {},
"outputs": [],
"source": [
"df = jitter.prep(original, config=config)\n",
"jitter.trace_jitter(df, threshold=500)"
"from xlap.analyse.cdf import multi_cdf\n",
"from xlap.analyse.util import colors\n",
"import copy\n",
"cfg = copy.deepcopy(config)\n",
"list(map(cfg[\"durations\"].pop, (\"Decoding\",\n",
" \"ReceiverIPC\",\n",
" \"HandlePacket\", \n",
" \"Feedback\", \n",
" \"SenderIPC\",\n",
" \"SenderEnqueued\",\n",
" \"Enqueue\")))\n",
"multi_cdf(dfs, cfg, colors=colors)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Correlation"
"## Correlation with E2E Latency"
]
},
{
......@@ -101,15 +118,15 @@
"metadata": {},
"outputs": [],
"source": [
"correlation(df[df[\"EndToEnd_D\"] < 500], config)"
"from xlap.analyse.correlation import multi_correlation\n",
"multi_correlation(dfs, config, colors=colors, figsize=(3.0,2.0), cols=4)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"# $\\Delta$elta\n",
"## Latency Criticality"
]
},
......@@ -119,7 +136,8 @@
"metadata": {},
"outputs": [],
"source": [
"d = analyse(original, config)"
"from xlap.analyse.latency import analyse\n",
"d = analyse(df_1GHz, config)"
]
},
{
......@@ -153,6 +171,41 @@
"source": [
"d.cfg"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Timing Behaviour"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from xlap.analyse.timing import timing_behaviour\n",
"timing_behaviour(df_1GHz, df_2GHz, config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"timing_behaviour(df_1GHz, df_3GHz, config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"timing_behaviour(df_2GHz, df_3GHz, config)"
]
}
],
"metadata": {
......@@ -171,21 +224,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
},
"widgets": {
"state": {
"df95aa8c42974dfeaf8e0a2c05100645": {
"views": [
{
"cell_index": 6
}
]
}
},
"version": "1.2.0"
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
1 40.112488 0.28655806569935959455261300
2 37.635804 0.13545612357162314105068459
3 44.867554 0.15736979554175162807913194
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
996816
analyzing CPU 1:
998867
analyzing CPU 2:
999414
analyzing CPU 3:
997363
analyzing CPU 4:
1000507
analyzing CPU 5:
999687
analyzing CPU 6:
1000234
analyzing CPU 7:
997089
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
925859
analyzing CPU 1:
1000097
analyzing CPU 2:
999960
analyzing CPU 3:
993535
analyzing CPU 4:
1000371
analyzing CPU 5:
998046
analyzing CPU 6:
993261
analyzing CPU 7:
992578
RAPL::Package energy {0}: 16.163391J
RAPL::PowerPlane0 (core) {0}: 1.458923J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 4.892883J
Time: 5.087s
Found Haswell CPU
RAPL::Package energy {0}: 23.949097J
RAPL::PowerPlane0 (core) {0}: 1.922913J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 5.827271J
Time: 5.729s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1999921
analyzing CPU 1:
2000058
analyzing CPU 2:
1899980
analyzing CPU 3:
1999921
analyzing CPU 4:
1903125
analyzing CPU 5:
1970664
analyzing CPU 6:
1390976
analyzing CPU 7:
1978457
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1998964
analyzing CPU 1:
1949746
analyzing CPU 2:
1915156
analyzing CPU 3:
1999921
analyzing CPU 4:
2000605
analyzing CPU 5:
1938535
analyzing CPU 6:
1998007
analyzing CPU 7:
1996093
RAPL::Package energy {0}: 15.436951J
RAPL::PowerPlane0 (core) {0}: 2.320251J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 4.621643J
Time: 4.858s
Found Haswell CPU
RAPL::Package energy {0}: 22.198853J
RAPL::PowerPlane0 (core) {0}: 2.989563J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 5.706726J
Time: 5.616s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
3000019
analyzing CPU 1:
3000019
analyzing CPU 2:
2999746
analyzing CPU 3:
2999882
analyzing CPU 4:
3000429
analyzing CPU 5:
3000156
analyzing CPU 6:
3000703
analyzing CPU 7:
3000429
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2901445
analyzing CPU 1:
2904726
analyzing CPU 2:
2873554
analyzing CPU 3:
2983886
analyzing CPU 4:
2900078
analyzing CPU 5:
2909375
analyzing CPU 6:
2860019
analyzing CPU 7:
2907050
RAPL::Package energy {0}: 21.381104J
RAPL::PowerPlane0 (core) {0}: 5.176331J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 4.532715J
Time: 4.759s
Found Haswell CPU
RAPL::Package energy {0}: 23.486450J
RAPL::PowerPlane0 (core) {0}: 4.465149J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 5.348450J
Time: 5.553s
Found Haswell CPU
gnuplot="gnuplot"
format="png"
echo "
set term $format
set output 'energy-efficiency.$format'
set boxwidth 0.5
set yrange [0:]
set xtic 1
set ylabel 'Per-package ET² (nJs²)'
set xlabel 'Processor speed (GHz)'
set style fill solid
set nokey
plot 'data.txt' using 1:3:xtic(1) with boxes" | $gnuplot
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
packets per sample: 4095
freq/kHz avg e2e latency/us total energy/J avg packet energy/mJ avg packet ET²/nJs²
======== ================== ============ ======================= ============================
1000000 171.03833943833945 40.112488 9.79547936507936507936 0.28655806569935959455261300
2000000 121.40195360195361 37.635804 9.19067252747252747252 0.13545612357162314105068459
3000000 119.84542124542125 44.867554 10.95666764346764346764 0.15736979554175162807913194
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1005566
analyzing CPU 1:
1000097
analyzing CPU 2:
995859
analyzing CPU 3:
999003
analyzing CPU 4:
987929
analyzing CPU 5:
1000097
analyzing CPU 6:
998867
analyzing CPU 7:
999960
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
999960
analyzing CPU 1:
997910
analyzing CPU 2:
1000097
analyzing CPU 3:
3000156
analyzing CPU 4:
1000097
analyzing CPU 5:
905488
analyzing CPU 6:
2581250
analyzing CPU 7:
1005429
RAPL::Package energy {0}: 0.870178J
RAPL::PowerPlane0 (core) {0}: 0.098694J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.529358J
Time: 0.540s
Found Haswell CPU
RAPL::Package energy {0}: 5.580688J
RAPL::PowerPlane0 (core) {0}: 0.189087J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.984375J
Time: 2.137s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
1999921
analyzing CPU 1:
1986386
analyzing CPU 2:
1999921
analyzing CPU 3:
1989257
analyzing CPU 4:
1999921
analyzing CPU 5:
1813300
analyzing CPU 6:
2000058
analyzing CPU 7:
2000058
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2000058
analyzing CPU 1:
2000195
analyzing CPU 2:
1999921
analyzing CPU 3:
1899980
analyzing CPU 4:
1937578
analyzing CPU 5:
1818359
analyzing CPU 6:
1999921
analyzing CPU 7:
2000332
RAPL::Package energy {0}: 1.559082J
RAPL::PowerPlane0 (core) {0}: 0.370239J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.410339J
Time: 0.402s
Found Haswell CPU
RAPL::Package energy {0}: 5.509460J
RAPL::PowerPlane0 (core) {0}: 0.294189J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.947327J
Time: 2.127s
Found Haswell CPU
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2956816
analyzing CPU 1:
3000019
analyzing CPU 2:
2999882
analyzing CPU 3:
3000019
analyzing CPU 4:
3000429
analyzing CPU 5:
3000019
analyzing CPU 6:
3001250
analyzing CPU 7:
3000019
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
2900761
analyzing CPU 1:
2941367
analyzing CPU 2:
2899804
analyzing CPU 3:
2899941
analyzing CPU 4:
2900214
analyzing CPU 5:
3000976
analyzing CPU 6:
2962421
analyzing CPU 7:
2913886
RAPL::Package energy {0}: 0.902710J
RAPL::PowerPlane0 (core) {0}: 0.266296J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 0.333801J
Time: 0.342s
Found Haswell CPU
RAPL::Package energy {0}: 3.613647J
RAPL::PowerPlane0 (core) {0}: 0.369873J
RAPL::PowerPlane1 (on-core GPU if avail) {0}: 0.000000J
RAPL::DRAM energy {0}: 1.892212J
Time: 2.119s
Found Haswell CPU
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
999960
analyzing CPU 1:
997773
analyzing CPU 2:
998593
analyzing CPU 3:
992304
analyzing CPU 4:
1000097
analyzing CPU 5:
999960
analyzing CPU 6:
999003
analyzing CPU 7:
999960
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
analyzing CPU 0:
980000
analyzing CPU 1:
999140
analyzing CPU 2:
999960
analyzing CPU 3:
992851
analyzing CPU 4:
1000507
analyzing CPU 5:
999414
analyzing CPU 6:
1165253
analyzing CPU 7:
3001386
RAPL::Package energy {0}: 1.098145J