Skip to content

Commit

Permalink
flamegraphs.sh simplify to a for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmoon79 committed Jun 2, 2024
1 parent 4b115c2 commit 46d5862
Showing 1 changed file with 26 additions and 63 deletions.
89 changes: 26 additions & 63 deletions tools/flamegraphs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,66 +15,29 @@ FREQ=9999 "${SCRIPT}" '--help'
echo
echo

export FREQ=7000

export OUT="${DIROUT}/flamegraph-evtx.svg"
(set -x
"${SCRIPT}" './logs/programs/evtx/Microsoft-Windows-Kernel-PnP%4Configuration.evtx'
)
echo
echo

export OUT="${DIROUT}/flamegraph-journal.svg"
(set -x
"${SCRIPT}" './logs/programs/journal/Ubuntu22-user-1000x3.journal'
)
echo
echo

export OUT="${DIROUT}/flamegraph-syslog-no-matches.svg"
(set -x
"${SCRIPT}" './logs/other/tests/numbers3.log'
)
echo

export OUT="${DIROUT}/flamegraph-syslog.svg"
(set -x
"${SCRIPT}" './logs/other/tests/gen-99999-1-Motley_Crue.log'
)
echo
echo

export OUT="${DIROUT}/flamegraph-syslog-gz.svg"
(set -x
"${SCRIPT}" './logs/other/tests/gen-1000-3-foobar.log.gz'
)
echo
echo

export OUT="${DIROUT}/flamegraph-syslog-lz4.svg"
(set -x
"${SCRIPT}" './logs/other/tests/gen-1000-3-foobar.log.lz4'
)
echo
echo

export OUT="${DIROUT}/flamegraph-syslog-xz.svg"
(set -x
"${SCRIPT}" './logs/other/tests/gen-1000-3-foobar.log.xz'
)
echo
echo

export OUT="${DIROUT}/flamegraph-syslog-tar.svg"
(set -x
"${SCRIPT}" './logs/other/tests/gen-1000-3-foobar.log.tar'
)
echo
echo

export OUT="${DIROUT}/flamegraph-utmp.svg"
(set -x
"${SCRIPT}" './logs/CentOS7/x86_64/wtmp'
)
echo
echo
export FREQ=8000

for FLAMGRAPHOUT_S4FILE in \
"${DIROUT}/flamegraph-evtx.svg|./logs/programs/evtx/Microsoft-Windows-Kernel-PnP%4Configuration.evtx" \
"${DIROUT}/flamegraph-journal.svg|./logs/programs/journal/RHE_91_system.journal" \
"${DIROUT}/flamegraph-journal-gz.svg|./logs/programs/journal/RHE_91_system.journal.gz" \
"${DIROUT}/flamegraph-journal-lz4.svg|./logs/programs/journal/RHE_91_system.journal.lz4" \
"${DIROUT}/flamegraph-journal-xz.svg|./logs/programs/journal/RHE_91_system.journal.xz" \
"${DIROUT}/flamegraph-journal-tar.svg|./logs/programs/journal/RHE_91_system.tar" \
"${DIROUT}/flamegraph-syslog-no-matches.svg|./logs/other/tests/numbers3.log" \
"${DIROUT}/flamegraph-syslog.svg|./logs/other/tests/gen-99999-1-Motley_Crue.log" \
"${DIROUT}/flamegraph-syslog-gz.svg|./logs/other/tests/gen-1000-3-foobar.log.gz" \
"${DIROUT}/flamegraph-syslog-lz4.svg|./logs/other/tests/gen-1000-3-foobar.log.lz4" \
"${DIROUT}/flamegraph-syslog-xz.svg|./logs/other/tests/gen-1000-3-foobar.log.xz" \
"${DIROUT}/flamegraph-syslog-tar.svg|./logs/other/tests/gen-1000-3-foobar.log.tar" \
"${DIROUT}/flamegraph-utmp.svg|./logs/CentOS7/x86_64/wtmp" \
; do
export OUT=${FLAMGRAPHOUT_S4FILE%%|*}
S4FILE=${FLAMGRAPHOUT_S4FILE##*|}
(
set -x
"${SCRIPT}" "${S4FILE}"
)
echo
echo
done

0 comments on commit 46d5862

Please sign in to comment.