-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update catapult traceviewer to fix chrome issue related to crbug.com/…
…1036492
- Loading branch information
Showing
6 changed files
with
105 additions
and
24 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
Binary file not shown.
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,85 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (C) 2022 Kristofer Berggren | ||
# All rights reserved. | ||
# | ||
# cpuusage is distributed under the BSD 3-Clause license, see LICENSE for | ||
# details. | ||
|
||
TMPCATAPULT="/tmp/cpuusage-catapult" | ||
|
||
prereq() | ||
{ | ||
if [[ ! -d "${TMPCATAPULT}" ]]; then | ||
git clone https://chromium.googlesource.com/catapult ${TMPCATAPULT} || exit 1 | ||
else | ||
echo "using existing clone in ${TMPCATAPULT}" | ||
fi | ||
|
||
if [[ ! -d "build" ]]; then | ||
./make.sh build || exit 1 | ||
else | ||
echo "using existing build in ./build" | ||
fi | ||
} | ||
|
||
update_catapult() | ||
{ | ||
pushd ./build/share/cpuusage/catapult/ > /dev/null && \ | ||
rm -rf ./* && \ | ||
cp ${TMPCATAPULT}/LICENSE LICENSE && \ | ||
cp -a ${TMPCATAPULT}/tracing tracing && \ | ||
rm -rf tracing/test_data && \ | ||
mkdir common && \ | ||
cp -a ${TMPCATAPULT}/common/py_vulcanize common/ && \ | ||
mkdir third_party && \ | ||
cp -a ${TMPCATAPULT}/third_party/beautifulsoup4-4.9.3 third_party/ && \ | ||
cp -a ${TMPCATAPULT}/third_party/polymer third_party/ && \ | ||
popd > /dev/null && \ | ||
echo "updated catapult module" || exit 1 | ||
} | ||
|
||
package_catapult() | ||
{ | ||
pushd ./build > /dev/null && \ | ||
rm -f catapult.tar.gz && \ | ||
tar -czvf catapult.tar.gz share/cpuusage/catapult && \ | ||
popd > /dev/null && \ | ||
cp ./build/catapult.tar.gz ./ext/catapult.tar.gz && \ | ||
rm -f ./build/catapult.tar.gz && \ | ||
echo "packaged catapult module" || exit 1 | ||
} | ||
|
||
test_catapult() | ||
{ | ||
SCRIPT="./build/share/cpuusage/catapult/tracing/bin/trace2html" | ||
TESTJSON="./tests/ex.json" | ||
TMPHTML="./build/sanity_test.html" | ||
python3 ${SCRIPT} ${TESTJSON} --output=${TMPHTML} > /dev/null && \ | ||
rm "${TMPHTML}" && \ | ||
echo "sanity test passed" || exit 1 | ||
} | ||
|
||
test_all() | ||
{ | ||
./make.sh tests && \ | ||
echo "all tests passed" || exit 1 | ||
} | ||
|
||
cleanup() | ||
{ | ||
rm -rf build && \ | ||
rm -rf "${TMPCATAPULT}" && \ | ||
echo "cleanup complete" || exit 1 | ||
} | ||
|
||
prereq | ||
update_catapult | ||
test_catapult | ||
test_all | ||
update_catapult | ||
package_catapult | ||
#cleanup | ||
|
||
echo "success" | ||
exit 0 |
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
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,11 @@ | ||
{ | ||
"otherData": { | ||
"timestamp":"2022-09-06 19:41:31 +0800", | ||
"os":"Darwin 21.6.0", | ||
"cores":"4" | ||
}, | ||
"traceEvents": [ | ||
{ "ph":"B", "cat":"perf", "pid":"13441", "tid":"0x105cf3600", "name":"wrap_pthread_mutex_lock + 0", "ts":1662464491302117 }, | ||
{ "ph":"E", "cat":"perf", "pid":"13441", "tid":"0x105cf3600", "name":"wrap_pthread_mutex_lock + 0", "ts":1662464491302122 } | ||
] | ||
} |