Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tracing of federate interactions #1632

Merged
merged 75 commits into from
Mar 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
aeec478
Start on tracing federate communication
edwardalee Feb 17, 2023
fa209b9
Report total count of events in summary file
edwardalee Feb 17, 2023
b124a9d
Fixed warning message
edwardalee Feb 17, 2023
aa52637
Add cases for TAG and PTAG
byeonggiljun Feb 18, 2023
17b19b9
Add canvas for RTI tracing in trace_to_csv and reactor-c submodule
ChadliaJerad Feb 21, 2023
9e31276
Merge remote-tracking branch 'origin/master' into tracing-federates
edwardalee Feb 23, 2023
4ef5fe2
Renamed reaction_number to id_number
edwardalee Feb 23, 2023
f4e01d8
Align reactor-c
edwardalee Feb 23, 2023
8d14005
Aligned reactor-c
edwardalee Feb 23, 2023
ef09cb9
Fixed bogus comment
edwardalee Feb 23, 2023
9b04703
Added attempt to pass -t argument to the RTI... Doesn't work
edwardalee Feb 23, 2023
3baa0a0
Align reactor-c
edwardalee Feb 23, 2023
ef7a4da
Refactored file handling to support opening multiple files
edwardalee Feb 23, 2023
fab6dc5
Inherit tracing property from main context
lhstrh Feb 23, 2023
60f2789
Revert "Inherit tracing property from main context"
lhstrh Feb 23, 2023
bae32df
By default, let main file (re)set target properties specified in gene…
lhstrh Feb 24, 2023
b401807
1st draft of wip prototype for communication visualization
ChadliaJerad Feb 24, 2023
fe0a38e
Merge branch 'tracing-federates' of github.com:lf-lang/lingua-franca …
ChadliaJerad Feb 24, 2023
7464e2e
Reorganized how to invoke visualization utility
edwardalee Feb 24, 2023
531c553
Minor bug and documentation fixes.
ChadliaJerad Feb 24, 2023
0f21340
Consolidated cases into default
edwardalee Feb 25, 2023
0f5a372
Fixed makefile for executable for Python utilities
edwardalee Feb 25, 2023
867d3ce
fedsd refactoring, to support tracepoints matching and towards intra-…
ChadliaJerad Feb 27, 2023
fb14764
Fix labels rotation and better rendering
ChadliaJerad Feb 28, 2023
50cefb9
Fixing matching arrows + Better naming + Add FIXMEs for future todos
ChadliaJerad Feb 28, 2023
ef6eb44
A better fix for the previous matching bug
ChadliaJerad Feb 28, 2023
8c31f90
Merge into tracing-federates (from master lingua-franca and main reac…
ChadliaJerad Mar 2, 2023
037aa40
Improve matching mechanism by accounting for part of the payload + be…
ChadliaJerad Mar 3, 2023
ef30500
Aligned reactor-c
edwardalee Mar 5, 2023
5285c4c
Better matching between events. More improvements are WiP.
ChadliaJerad Mar 5, 2023
7e44798
Merge branch 'tracing-federates' of github.com:lf-lang/lingua-franca …
ChadliaJerad Mar 5, 2023
7bd29f7
Minor changes
edwardalee Mar 5, 2023
1fd95d2
Merge branch 'master' into tracing-federates
ChadliaJerad Mar 6, 2023
da26cb5
Exit if trace files don't exist
edwardalee Mar 6, 2023
0e03b67
Exit rather than segfaulting when reading trace file fails
edwardalee Mar 6, 2023
efec395
Merge branch 'tracing-federates' of github.com:lf-lang/lingua-franca …
ChadliaJerad Mar 6, 2023
9c5ca19
Aligning reactor-c
ChadliaJerad Mar 6, 2023
e9b6e35
Make fedsd aware of the changes in tracing mechanis under reactor-c. …
ChadliaJerad Mar 7, 2023
5c9cfc4
Adjusted to refactored tracing fields and aligned reactor-c
edwardalee Mar 7, 2023
6feab54
Display time values at start and end of arrows and adapted to adjuste…
edwardalee Mar 7, 2023
bc19dd6
Fix of the extreme rare case when two tracepoints have exactly the sa…
ChadliaJerad Mar 7, 2023
2841211
Enlarge left and right padding in the svg figure, so that time is not…
ChadliaJerad Mar 8, 2023
5302975
Simplifying fedsd and adding support for more tracepoints
ChadliaJerad Mar 8, 2023
3f86924
Reflecting new tracepoints + Aligning reactor-c
ChadliaJerad Mar 9, 2023
990f3f3
Simplify fedsd call by including the csv transformation in the script…
ChadliaJerad Mar 9, 2023
62661a3
Added usage check
edwardalee Mar 9, 2023
6348d23
Aligned reactor C
edwardalee Mar 9, 2023
17216fa
Added CSS styling and arrowhead rotation
edwardalee Mar 9, 2023
2f41482
Removed dependance on physical time for matching
edwardalee Mar 9, 2023
d08dd71
Use the federate name instead of the id in the diagram
ChadliaJerad Mar 9, 2023
6804dbe
Add logical time advance in the diagram
ChadliaJerad Mar 9, 2023
8f92d32
Align reactor-c. This includes Eliminating unnecessy TAG messages (PR…
ChadliaJerad Mar 9, 2023
ce4d36f
Merge branch 'master' into tracing-federates
lhstrh Mar 10, 2023
f4653ad
Align reactor-c
edwardalee Mar 10, 2023
873bdef
Attempt to get mysterious unreproducible compile error to go
edwardalee Mar 10, 2023
483abdd
Cleanup logged messages + Update the font in trace visualizer + Align…
ChadliaJerad Mar 10, 2023
7505722
Merged in master
edwardalee Mar 12, 2023
366c561
Aligned reactor-c
edwardalee Mar 12, 2023
06c9b10
Merge branch 'master' into tracing-federates
cmnrd Mar 13, 2023
f1aab48
Merge master + Align reactor-c + update reactor-cpp
ChadliaJerad Mar 15, 2023
2370a06
Add tracepoints + Update message labels
ChadliaJerad Mar 15, 2023
d65dab5
Merge branch 'tracing-federates' of github.com:lf-lang/lingua-franca …
ChadliaJerad Mar 15, 2023
572c8c4
Align reactor-c
edwardalee Mar 15, 2023
c7fa42c
Merge branch 'master' into tracing-federates
ChadliaJerad Mar 16, 2023
5461bd6
Check CI with fix-unthreaded-tracing branch in reactor-c
ChadliaJerad Mar 18, 2023
2c1946a
Merge remote-tracking branch 'origin/master' into tracing-federates
lhstrh Mar 20, 2023
81cac86
Merge branch 'master' into tracing-federates
lhstrh Mar 20, 2023
403e642
Aligned reactor-c with tracing-federates
edwardalee Mar 22, 2023
3d5407a
Align reactor-c
edwardalee Mar 22, 2023
dc8c028
Align reactor-c
edwardalee Mar 22, 2023
ad34136
Align reactor-c
edwardalee Mar 22, 2023
3d9264d
Align reactor-c
edwardalee Mar 22, 2023
f243b7d
Align reactor-c.
ChadliaJerad Mar 22, 2023
cbbca7b
Align reactor-c
edwardalee Mar 23, 2023
0d67047
Align reactor-c
edwardalee Mar 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reorganized how to invoke visualization utility
  • Loading branch information
edwardalee committed Feb 24, 2023
commit 7464e2e3faa533a05e2d24f0632dd6da937a59d9
58 changes: 58 additions & 0 deletions lib/scripts/launch-fedsd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

#============================================================================
# Description: Visualize federated trace data for RTI-federate interactions.
# Authors: Chadlia Jerad
# Edward A. Lee
# Usage: Usage: fedsd -r [rti.csv] -f [fed.csv ...]
#============================================================================

#============================================================================
# Preamble
#============================================================================

# Copied from build.sh FIXME: How to avoid copying

# Find the directory in which this script resides in a way that is compatible
# with MacOS, which has a `readlink` implementation that does not support the
# necessary `-f` flag to canonicalize by following every symlink in every
# component of the given name recursively.
# This solution, adapted from an example written by Geoff Nixon, is POSIX-
# compliant and robust to symbolic links. If a chain of more than 1000 links
# is encountered, we return.
find_dir() (
start_dir=$PWD
cd "$(dirname "$1")"
link=$(readlink "$(basename "$1")")
count=0
while [ "${link}" ]; do
if [[ "${count}" -lt 1000 ]]; then
cd "$(dirname "${link}")"
link=$(readlink "$(basename "$1")")
((count++))
else
return
fi
done
real_path="$PWD/$(basename "$1")"
cd "${start_dir}"
echo `dirname "${real_path}"`
)

# Report fatal error and exit.
function fatal_error() {
1>&2 echo -e "\e[1mfedsd: \e[31mfatal error: \e[0m$1"
exit 1
}

abs_path="$(find_dir "$0")"

if [[ "${abs_path}" ]]; then
base=`dirname $(dirname ${abs_path})`
else
fatal_error "Unable to determine absolute path to $0."
fi

# FIXME: Check that python3 is in the path.

python3 "${base}/util/tracing/visualization/fedsd.py" "$@"
6 changes: 6 additions & 0 deletions util/tracing/README.md
Original file line number Diff line number Diff line change
@@ -3,12 +3,18 @@
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).

## Installing

```
2 changes: 2 additions & 0 deletions util/tracing/makefile
Original file line number Diff line number Diff line change
@@ -29,6 +29,8 @@ install: trace_to_csv trace_to_chrome trace_to_influxdb
mv trace_to_csv ../../bin
mv trace_to_chrome ../../bin
mv trace_to_influxdb ../../bin
ln -f -s ../../lib/scripts/launch-fedsd.sh ../../bin/fedsd
chmod +x ../../bin/fedsd

clean:
rm -f *.o
File renamed without changes.
File renamed without changes.