-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2aa2153
commit 2b0ba56
Showing
76 changed files
with
2,442 additions
and
15 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 |
---|---|---|
@@ -1,9 +1,21 @@ | ||
#!/bin/bash | ||
# | ||
# record-test.sh - Overwrite flame graph test result files. | ||
# | ||
# See test.sh, which checks these resulting files. | ||
# | ||
# Currently only tests stackcollapse-perf.pl. | ||
|
||
set -v -x | ||
|
||
for opt in pid tid inline kernel context ; do | ||
for t in test/*.txt ; do | ||
echo testing $t : $opt | ||
./stackcollapse-perf.pl --"${opt}" "${t}" 2> /dev/null > test/results/"${t#*/}"-collapsed-"${opt}".txt | ||
# ToDo: add some form of --inline, and --inline --context tests. These are | ||
# tricky since they use addr2line, whose output will vary based on the test | ||
# system's binaries and symbol tables. | ||
for opt in pid tid kernel jit all addrs; do | ||
for testfile in test/*.txt ; do | ||
echo testing $testfile : $opt | ||
outfile=${testfile#*/} | ||
outfile=test/results/${outfile%.txt}"-collapsed-${opt}.txt" | ||
./stackcollapse-perf.pl --"${opt}" "${testfile}" 2> /dev/null > $outfile | ||
done | ||
done |
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 |
---|---|---|
@@ -1,18 +1,26 @@ | ||
#!/bin/bash | ||
# | ||
# test.sh - Check flame graph software vs test result files. | ||
# | ||
# This is used to detect regressions in the flame graph software. | ||
# See record-test.sh, which refreshes these files after intended software | ||
# changes. | ||
# | ||
# Currently only tests stackcollapse-perf.pl. | ||
|
||
set -euo pipefail | ||
set -x | ||
set -v | ||
|
||
|
||
for opt in pid tid kernel ; do | ||
for t in test/*.txt ; do | ||
echo testing $t : $opt | ||
outfile=test/results/${t#*/}-collapsed-${opt}.txt | ||
perl ./stackcollapse-perf.pl --"${opt}" "${t}" 2> /dev/null | diff -u - "${outfile}" | ||
perl ./flamegraph.pl "${outfile}" > /dev/null | ||
done | ||
done | ||
|
||
# ToDo: add some form of --inline, and --inline --context tests. These are | ||
# tricky since they use addr2line, whose output will vary based on the test | ||
# system's binaries and symbol tables. | ||
for opt in pid tid kernel jit all addrs; do | ||
for testfile in test/*.txt ; do | ||
echo testing $testfile : $opt | ||
outfile=${testfile#*/} | ||
outfile=test/results/${outfile%.txt}"-collapsed-${opt}.txt" | ||
perl ./stackcollapse-perf.pl --"${opt}" "${testfile}" 2> /dev/null | diff -u - "${outfile}" | ||
perl ./flamegraph.pl "${outfile}" > /dev/null | ||
done | ||
done |
Oops, something went wrong.