Commit 828faa98 authored by Sven Liefgen's avatar Sven Liefgen
Browse files

Safety notes

parent 52c938e1
...@@ -54,9 +54,7 @@ use xlap::Kind::*; ...@@ -54,9 +54,7 @@ use xlap::Kind::*;
use xlap::TimestampId::*; use xlap::TimestampId::*;
``` ```
Whereever you want to instrument your code, put one of the macros wrapped in Whereever you want to instrument your code, put one of the macros.
an `unsafe` block.
This is currently necessary as the safty analysis has not been done yet.
In the main application, initialize X-Lap. In the main application, initialize X-Lap.
...@@ -78,6 +76,14 @@ unsafe { xlap::dump!("path/to/output.csv", &[TABLE1, TABLE2]) } ...@@ -78,6 +76,14 @@ unsafe { xlap::dump!("path/to/output.csv", &[TABLE1, TABLE2]) }
to select which table to dump. to select which table to dump.
### Memory Safety
Most of the functions in X-Lap are `unsafe`, but the macros hide this, which is not optimal.
This is to prevent all the `unnessecary unsafe` warnings that would be generated otherwise in case X-Lap is disabled.
It has to be assured, that no two threads write the same timestamp in the same table for the same index at the same time.
Furthermore, before dumping data out, it has to be assured, that all of the timestamps have been written.
## How to install X-Lap? (C-version / python analysis tools) ## How to install X-Lap? (C-version / python analysis tools)
Install the following prerequisites via pip: `numpy`, `scipy`, `pandas`, `matplotlib`, `scikit-learn`, `ruamel.yaml`. Install the following prerequisites via pip: `numpy`, `scipy`, `pandas`, `matplotlib`, `scikit-learn`, `ruamel.yaml`.
......
Supports Markdown
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