Skip to content

Commit

Permalink
Document to run dltlyse with docker
Browse files Browse the repository at this point in the history
  • Loading branch information
yen3 authored and aigarius committed Nov 23, 2022
1 parent 47b7e0b commit de3f21e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN set -ex \
&& git checkout ${LIBDLT_VERSION} \
&& cd /dlt-daemon \
&& cmake CMakeLists.txt \
&& make \
&& make -j \
&& make install


Expand All @@ -23,7 +23,7 @@ RUN set -ex \
&& apk add python3 py3-pip py3-virtualenv \
&& cd /build/dltlyse \
&& pip install --no-cache-dir build wheel \
&& python3 -m build --sdist --wheel
&& python3 -m build --wheel


FROM alpine:3.17
Expand All @@ -33,8 +33,11 @@ COPY --from=builder /build/dltlyse/dist/dltlyse*.whl /

RUN set -ex \
&& ldconfig /usr/local/lib \
&& apk add --no-cache python3 \
&& apk add --no-cache python3 py3-six \
&& apk add --no-cache --virtual .build-deps py3-pip git \
&& pip install --no-cache-dir six \
&& pip install --no-cache-dir dltlyse*.whl \
&& apk del .build-deps

ENTRYPOINT [ "dltlyse" ]

CMD [ "--help" ]
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,38 @@

A Python module and a collection of plugins to support analysis of DLT traces.

# Installation
## Run dltlyse with docker

# Execution
1. Build the docker image

In SDK simply go to your result folder where your DLT files are and run:
```
dltlyse *.dlt
```bash
git clone https://github.com/bmwcarit/dltlyse
cd dltlyse
docker build -t bmwcarit/dltlyse .
```

Run dltlyse with "--help" option to see more command line options
2. Run the dltlyse container

```bash
# Get the command line help
docker run -it --rm bmwcarit/dltlyse --help

# Run with with dlt file(s)
docker run -it --rm \
-v "$(pwd):/workspace" \
-w /workspace bmwcarit/dltlyse \
<path-to>.dlt <second-path-to>.dlt

# To specify your own dltlyse plugins specify path to their folder:
docker run -it --rm \
-v /path/to/plugins:/plugins \
-v "$(pwd):/workspace" \
-w /workspace \
bmwcarit/dltlyse \
-d /plugins <path-to>.dlt
```

# How it works
## How it works

`dltlyse` reads all messages from given DLT trace file and passes each DLT message to __call__ of all enabled plugins.
Plugin then decides if the message is interesting for it's purpose and collects data.
Expand Down Expand Up @@ -64,3 +84,4 @@ class MyCustomPlugin(Plugin):
stdout="Detailed log of failure",
)
```

0 comments on commit de3f21e

Please sign in to comment.