Loading README.md +65 −21 Original line number Diff line number Diff line # X-Lap: A Systems Approach for Cross-Layer Profiling and Latency Analysis for Cyber-Physical Networks ## Conventions * Stampnames: `_T`: Timestamp (us precision) `_C`: Clockstamp `_D`: Duration (us precision) * Reserved Names: * `Channel` * `Sender` * `Receiver` * `EndToEnd` ## How to install X-Lap? Enter the project directory and type `python setup.py install` to install `xlap` on your system. ## How to use X-lap? Loading @@ -36,13 +24,69 @@ Define time- and cyclestamps: ### Step 2: Use the provided xlap analysis tools * Write your xlap.yml file as follows: * Write your `xlap.yml` file as follows: ```yaml data_files: ads stamps: ads durations: asd ```yml data_files: sender: sender.csv receiver: receiver.csv cycle_reference: sender: StampA receiver: SampB time_reference: sender: StampC receiver: StampE stamps: StampA: Source: receiver Type: time StampB: Source: receiver Type: time StampC: Source: receiver Type: time StampD: Source: receiver Type: cycle StampE: Source: receiver Type: time durations: DurationA: Start: StampA Stop: StampB Source: sender DurationB: Start: StampC Stop: StampD Source: receiver ``` * Run one of the following analyses on the data set: * Jitter Analysis (`jitter`) * You can run a jitter analysis via `xlap jitter`. The parameter `-e` exports the diagrams as `pdf`. * The best way to interact with `xlap` is through a [Jupyter Python 3 Notebook](http://jupyter.org/). An example can be found in `notebook.ipynb`. * `xlap.analyse.trace.traces()` can be used to investigate individual packet traces. ## Conventions * Suffixes (indicate type): * `_T`: Timestamp (us precision) * `_C`: Clockstamp * `_D`: Duration (us precision) * Reserved Names (including suffixes as mentioned before): * `Channel` * `Sender` * `SenderCycle` * `Receiver` * `ReceiverCycle` * `EndToEnd` * Note that expressions with other suffixes such as `SenderQueueing_T` would be allowed. notebook.ipynb +71 −51 File changed.Preview size limit exceeded, changes collapsed. Show changes xlap/analyse/trace.py +10 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ import numpy as np import matplotlib.pyplot as plt from xlap.analyse.util import extract_durations from ipywidgets import interact import ipywidgets as widgets def _create_line(config): Loading Loading @@ -62,3 +64,11 @@ def trace(data_frame, config, export=False, file_name="TraceJitter.pdf"): if export: plt.savefig(file_name) plt.show() def traces(df, config): """ Display a slider to select sequence numbers and the respective trace. """ @interact(seq_no=widgets.IntSlider(min=1,max=len(df),step=1,value=47)) def _f(seq_no): trace(df.ix[seq_no],config) xlap/parse.py +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ def evaluate(sender_file, receiver_file, config, kind=0): # Generate Durations for name, duration in config["durations"].items(): diff = df[duration["Stop"] + "_C"] - df[duration["Start"] + "_C"] df[name + "Cycles"] = diff df[name + "_C"] = diff df[name + "_D"] = diff * df[duration["Source"].capitalize() + "Cycle_D"] df["EndToEnd_D"] = df["Sender_D"] + df["Receiver_D"] Loading Loading
README.md +65 −21 Original line number Diff line number Diff line # X-Lap: A Systems Approach for Cross-Layer Profiling and Latency Analysis for Cyber-Physical Networks ## Conventions * Stampnames: `_T`: Timestamp (us precision) `_C`: Clockstamp `_D`: Duration (us precision) * Reserved Names: * `Channel` * `Sender` * `Receiver` * `EndToEnd` ## How to install X-Lap? Enter the project directory and type `python setup.py install` to install `xlap` on your system. ## How to use X-lap? Loading @@ -36,13 +24,69 @@ Define time- and cyclestamps: ### Step 2: Use the provided xlap analysis tools * Write your xlap.yml file as follows: * Write your `xlap.yml` file as follows: ```yaml data_files: ads stamps: ads durations: asd ```yml data_files: sender: sender.csv receiver: receiver.csv cycle_reference: sender: StampA receiver: SampB time_reference: sender: StampC receiver: StampE stamps: StampA: Source: receiver Type: time StampB: Source: receiver Type: time StampC: Source: receiver Type: time StampD: Source: receiver Type: cycle StampE: Source: receiver Type: time durations: DurationA: Start: StampA Stop: StampB Source: sender DurationB: Start: StampC Stop: StampD Source: receiver ``` * Run one of the following analyses on the data set: * Jitter Analysis (`jitter`) * You can run a jitter analysis via `xlap jitter`. The parameter `-e` exports the diagrams as `pdf`. * The best way to interact with `xlap` is through a [Jupyter Python 3 Notebook](http://jupyter.org/). An example can be found in `notebook.ipynb`. * `xlap.analyse.trace.traces()` can be used to investigate individual packet traces. ## Conventions * Suffixes (indicate type): * `_T`: Timestamp (us precision) * `_C`: Clockstamp * `_D`: Duration (us precision) * Reserved Names (including suffixes as mentioned before): * `Channel` * `Sender` * `SenderCycle` * `Receiver` * `ReceiverCycle` * `EndToEnd` * Note that expressions with other suffixes such as `SenderQueueing_T` would be allowed.
xlap/analyse/trace.py +10 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ import numpy as np import matplotlib.pyplot as plt from xlap.analyse.util import extract_durations from ipywidgets import interact import ipywidgets as widgets def _create_line(config): Loading Loading @@ -62,3 +64,11 @@ def trace(data_frame, config, export=False, file_name="TraceJitter.pdf"): if export: plt.savefig(file_name) plt.show() def traces(df, config): """ Display a slider to select sequence numbers and the respective trace. """ @interact(seq_no=widgets.IntSlider(min=1,max=len(df),step=1,value=47)) def _f(seq_no): trace(df.ix[seq_no],config)
xlap/parse.py +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ def evaluate(sender_file, receiver_file, config, kind=0): # Generate Durations for name, duration in config["durations"].items(): diff = df[duration["Stop"] + "_C"] - df[duration["Start"] + "_C"] df[name + "Cycles"] = diff df[name + "_C"] = diff df[name + "_D"] = diff * df[duration["Source"].capitalize() + "Cycle_D"] df["EndToEnd_D"] = df["Sender_D"] + df["Receiver_D"] Loading