Skip to content
Commits on Source (96)
*.ipynb filter=nbstripout
*.ipynb diff=ipynb
......@@ -2,3 +2,4 @@ build/
dist/
xlap.egg-info/
.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.
%% Cell type:markdown id: tags:
# X-Lap in Action
%% Cell type:markdown id: tags:
## Imports
%% Cell type:code id: tags:
``` python
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
from xlap.parse import evaluate, evaluate_side, parse_config
import xlap.analyse.jitter as jitter
from xlap.analyse.regress import linear as linear_regression
from xlap.analyse.trace import traces
from xlap.analyse.correlation import correlation
from xlap.analyse.latency import analyse
import pandas as pd
%matplotlib inline
```
%% Cell type:markdown id: tags:
## Data Retrieval
%% Cell type:code id: tags:
``` python
from xlap.parse import evaluate, parse_config
config = parse_config()
data_files = config["data_files"]
original = evaluate(data_files["sender"], data_files["receiver"], config=config, kind=0)
data_files = {
"sender": "rtn2018/20180417_testbed/",
"receiver": "rtn2018/20180417_testbed/"
}
df_1GHz = evaluate(data_files["sender"] + "sender-1000000.csv", data_files["receiver"] + "receiver-1000000.csv", config=config, kind=0)
df_1GHz.name = "1GHz"
df_2GHz = evaluate(data_files["sender"] + "sender-2000000.csv", data_files["receiver"] + "receiver-2000000.csv", config=config, kind=0)
df_2GHz.name = "2GHz"
df_3GHz = evaluate(data_files["sender"] + "sender-3000000.csv", data_files["receiver"] + "receiver-3000000.csv", config=config, kind=0)
df_3GHz.name = "3GHz"
dfs = [df_1GHz, df_2GHz, df_3GHz]
```
%% Cell type:markdown id: tags:
## Traces
## Individual Packet Traces
%% Cell type:code id: tags:
``` python
traces(original, config)
from xlap.analyse.trace import traces
traces(df_1GHz, config, global_xaxis=True)
```
%% Cell type:markdown id: tags:
## Jitter Analysis
## Trace Jitter Analysis
%% Cell type:code id: tags:
``` python
df = jitter.prep(original, config=config)
jitter.trace_jitter(df, threshold=500)
from xlap.analyse.jitter import multi_trace_jitter
multi_trace_jitter(dfs, config)
```
%% Cell type:markdown id: tags:
## Correlation
## Latency Distributions
%% Cell type:code id: tags:
``` python
correlation(df[df["EndToEnd_D"] < 500], config)
from xlap.analyse.cdf import multi_cdf
from xlap.analyse.util import colors
import copy
cfg = copy.deepcopy(config)
list(map(cfg["durations"].pop, ("Decoding",
"ReceiverIPC",
"HandlePacket",
"Feedback",
"SenderIPC",
"SenderEnqueued",
"Enqueue")))
multi_cdf(dfs, cfg, colors=colors)
```
%% Cell type:markdown id: tags:
## Correlation with E2E Latency
%% Cell type:code id: tags:
``` python
from xlap.analyse.correlation import multi_correlation
multi_correlation(dfs, config, colors=colors, figsize=(3.0,2.0), cols=4)
```
%% Cell type:markdown id: tags:
# $\Delta$elta
## Latency Criticality
%% Cell type:code id: tags:
``` python
d = analyse(original, config)
from xlap.analyse.latency import analyse
d = analyse(df_1GHz, config)
```
%% Cell type:markdown id: tags:
### Correlations
%% Cell type:code id: tags:
``` python
d.corr.sort_values(ascending=False)
```
%% Cell type:markdown id: tags:
### Control Flow Graph
%% Cell type:code id: tags:
``` python
d.cfg
```
%% Cell type:markdown id: tags:
## Timing Behaviour
%% Cell type:code id: tags:
``` python
from xlap.analyse.timing import timing_behaviour
timing_behaviour(df_1GHz, df_2GHz, config)
```
%% Cell type:code id: tags:
``` python
timing_behaviour(df_1GHz, df_3GHz, config)
```
%% Cell type:code id: tags:
``` python
timing_behaviour(df_2GHz, df_3GHz, config)
```
......
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.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
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