Skip to content

Commit

Permalink
tools: jbuf plots - use re_trace.json
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Sep 28, 2023
1 parent c05ac21 commit 72684da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tools/jbuf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cmake --build build
cd tools/jbuf
cp env-template .env
# edit .env
./plot_loop.sh
./run.sh
```

- The plots are collected in sub-directory plots.
Expand Down
9 changes: 5 additions & 4 deletions tools/jbuf/generate_plot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ if ! which gnuplot; then
exit 1
fi

if [ ! -f jbuf.json ]; then
echo "jbuf.json does not exist"
if [ ! -f re_trace.json ]; then
echo "re_trace.json does not exist"
exit 1
fi

function gen_datfile() {
ph=$1
filename=$2

jqc='.traceEvents[] | select (.ph == "'"${ph}"'") | .args.line'
cat jbuf.json | jq -r "${jqc}" > $filename
jqc='.traceEvents[] | select (.cat == "jbuf" and .ph == "'
jqc="${jqc}${ph}"'") | .args.line'
cat re_trace.json | jq -r "${jqc}" > $filename
}


Expand Down
8 changes: 0 additions & 8 deletions tools/jbuf/plot_loop.sh → tools/jbuf/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ fi

trap "./jitter-off.sh; killall -q baresip" EXIT

function gen_datfile() {
ph=$1
filename=$2

jqc='.traceEvents[] | select (.ph == "'"${ph}"'") | .args.line'
cat jbuf.json | jq -r "${jqc}" > $filename
}

source ./jitter.sh
init_jitter $netif

Expand Down

0 comments on commit 72684da

Please sign in to comment.