refact: optimize regular expression initialization
add profiling test. Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
20
tools/profiling.sh
Executable file
20
tools/profiling.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/env bash
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)" || exit 255
|
||||
|
||||
BUILD_DIR=${BUILD_DIR:="build-prof"}
|
||||
|
||||
cmake -B "$BUILD_DIR" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DDEBUG_MODE=OFF \
|
||||
-DPROFILING_MODE=ON
|
||||
|
||||
cmake --build "$BUILD_DIR" -j$(nproc)
|
||||
|
||||
QT_LOGGING_RULES="*.debug=false;*.info=false;*.warning=false" valgrind --tool=cachegrind --cachegrind-out-file="$BUILD_DIR/profiling.out" "$BUILD_DIR/apps/dde-application-manager/src/dde-application-manager"
|
||||
|
||||
echo "you can use Kcachegrind to check this profiling result."
|
@ -21,4 +21,4 @@ cmake --build "$BUILD_DIR" -j$(nproc)
|
||||
|
||||
cmake --build "$BUILD_DIR" -j$(nproc) -t test
|
||||
|
||||
gcovr -f "src/*" --html-details "$BUILD_DIR"/coverage.html
|
||||
gcovr -f "src/*" --html-details "$HTML_DIR"/coverage.html
|
||||
|
Reference in New Issue
Block a user