-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #259 from lf-lang/move-tracing-utils
Move tracing utils
- Loading branch information
Showing
15 changed files
with
2,856 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Build the tracing tools | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
run: | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- name: Check out reactor-c repository | ||
uses: actions/checkout@v3 | ||
- name: Building tracing utils | ||
working-directory: ./util/tracing | ||
run: make | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Makefile for utilities that convert Lingua Franca trace files | ||
# into other formats. | ||
# @author: Edward A. Lee | ||
REACTOR_C=../../ | ||
CC=gcc | ||
CFLAGS= -I$(REACTOR_C)/include/core/ \ | ||
-I$(REACTOR_C)/include/core/modal_models \ | ||
-I$(REACTOR_C)/include/core/platform \ | ||
-I$(REACTOR_C)/include/core/utils \ | ||
-DLF_UNTHREADED=1 \ | ||
-Wall | ||
DEPS= | ||
LIBS=-lcurl | ||
|
||
INSTALL_PREFIX ?= /usr/local/bin | ||
|
||
%.o: %.c $(DEPS) | ||
$(CC) -c -o $@ $< $(CFLAGS) | ||
|
||
trace_to_csv: trace_to_csv.o trace_util.o | ||
$(CC) -o trace_to_csv trace_to_csv.o trace_util.o | ||
|
||
trace_to_chrome: trace_to_chrome.o trace_util.o | ||
$(CC) -o trace_to_chrome trace_to_chrome.o trace_util.o | ||
|
||
trace_to_influxdb: trace_to_influxdb.o trace_util.o | ||
$(CC) -o trace_to_influxdb trace_to_influxdb.o trace_util.o $(LIBS) | ||
|
||
install: trace_to_csv trace_to_chrome trace_to_influxdb | ||
mv trace_to_csv $(INSTALL_PREFIX) | ||
mv trace_to_chrome $(INSTALL_PREFIX) | ||
mv trace_to_influxdb $(INSTALL_PREFIX) | ||
ln -f -s launch-fedsd.sh $(INSTALL_PREFIX)/fedsd | ||
chmod +x launch-fedsd.sh | ||
|
||
clean: | ||
rm -f *.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## util/tracing | ||
|
||
This directory contains the source code for utilities that are standalone executables | ||
for post-processing tracing data created by the tracing function in Lingua Franca. | ||
|
||
Utilities for visualizing the data are contained in the [visualization](visualization/README.md) | ||
directory. | ||
|
||
* trace\_to\_csv: Creates a comma-separated values text file from a binary trace file. | ||
The resulting file is suitable for analyzing in spreadsheet programs such as Excel. | ||
|
||
* trace\_to\_chrome: Creates a JSON file suitable for importing into Chrome's trace | ||
visualizer. Point Chrome to chrome://tracing/ and load the resulting file. | ||
|
||
* trace\_to\_influxdb: A preliminary implementation that takes a binary trace file | ||
and uploads its data into [InfluxDB](https://en.wikipedia.org/wiki/InfluxDB). | ||
|
||
* fedsd: A utility that converts trace files from a federate into sequence diagrams | ||
showing the interactions between federates and the RTI. | ||
|
||
## Installing | ||
|
||
``` | ||
sudo make install | ||
``` | ||
Will install the tracing executables to `/usr/local/bin` to install them to a different location, use the `INSTALL_PREFIX` flag, e.g. | ||
|
||
``` | ||
make install INSTALL_PREFIX=~/.local/bin | ||
``` |
Oops, something went wrong.