Skip to content

Commit

Permalink
Merge branch 'optimizeload' of github.com:vporyadke/ydb into optimize…
Browse files Browse the repository at this point in the history
…load
  • Loading branch information
vporyadke committed Oct 28, 2024
2 parents 04aaaee + ac816d0 commit 22b269b
Show file tree
Hide file tree
Showing 24,568 changed files with 5,201,970 additions and 180,100 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 9 additions & 2 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ runs:
run: |
mkdir -p ../build
patch -p1 < ydb/deploy/patches/0001-sanitizer-build.patch
# Temporary patch to dix difference between antlr4.9 and 4.13 behaviour
sed -i 's/TOKEN(NULL)/TOKEN(NULL_)/g' ydb/public/lib/ydb_cli/commands/interactive/yql_highlight.cpp
cd ../build
rm -rf *
export CC=/usr/bin/clang-14
export CC=/usr/bin/clang-16
export CC_FOR_BUILD=$CC
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCCACHE_PATH=/usr/local/bin/ccache \
Expand All @@ -38,11 +42,14 @@ runs:
shell: bash
if: ${{!inputs.sanitizer}}
run: |
# Temporary patch to dix difference between antlr4.9 and 4.13 behaviour
sed -i 's/TOKEN(NULL)/TOKEN(NULL_)/g' ydb/public/lib/ydb_cli/commands/interactive/yql_highlight.cpp
mkdir -p ../build
cd ../build
rm -rf *
export CONAN_USER_HOME=`pwd`
export CC=/usr/bin/clang-14
export CC=/usr/bin/clang-16
export CC_FOR_BUILD=$CC
# FIXME: set DCMAKE_CXX_FLAGS_RELWITHDEBINFO and DCMAKE_CXX_FLAGS bacause of global_flags.cmake flags override.
Expand Down
13 changes: 5 additions & 8 deletions .github/actions/build_analytics/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ runs:
shell: bash
run: |
set -ex
# FIXME: target name may be not the same as dir name
export TARGET_NAME=`basename ${{ inputs.build_target }}`
export TARGET_DIR=${{ inputs.build_target }}
export build_preset="${{ inputs.build_preset }}"
export build_target="${{ inputs.build_target }}"
./ya tool bloat --linker-map $TARGET_DIR/$TARGET_NAME.map.lld --input $TARGET_DIR/$TARGET_NAME --save-html ya_bloat_html --save-json bloat.json
./ya tool bloat --linker-map ydb/apps/ydbd/ydbd.map.lld --input ydb/apps/ydbd/ydbd --save-html ya_bloat_html --save-json bloat.json
./ydb/ci/build_bloat/template_bloat.py -j bloat.json -o template_bloat -t template_bloat_html
./ydb/ci/build_bloat/main.py --build-dir . --html-dir-cpp html_cpp_impact --html-dir-headers html_headers_impact
./ydb/ci/build_bloat/ydb_upload.py --html-dir-cpp html_cpp_impact --html-dir-headers html_headers_impact
Expand All @@ -45,7 +42,7 @@ runs:
run: |
set -ex
s3cmd sync -r --acl-public --stats --no-progress --no-mime-magic --guess-mime-type --no-check-md5 "ya_bloat_html/" "$S3_BUCKET_PATH/ya_bloat_html/"
echo "[ya bloat tool]($S3_URL_PREFIX/ya_bloat_html/index.html) (better use Safari, because it is too large for Chrome)" >> $GITHUB_STEP_SUMMARY
echo "[ya bloat tool]($S3_URL_PREFIX/ya_bloat_html/tree_map.html) (better use Safari, because it is too large for Chrome)" >> $GITHUB_STEP_SUMMARY
s3cmd sync -r --acl-public --stats --no-progress --no-mime-magic --guess-mime-type --no-check-md5 "template_bloat.by_size.txt" "$S3_BUCKET_PATH/template_bloat.by_size.txt"
TEMPLATE_BLOAT_BY_SIZE_URL=$S3_URL_PREFIX/template_bloat.by_size.txt
Expand All @@ -54,13 +51,13 @@ runs:
TEMPLATE_BLOAT_BY_COUNT_URL=$S3_URL_PREFIX/template_bloat.by_count.txt
s3cmd sync -r --acl-public --stats --no-progress --no-mime-magic --guess-mime-type --no-check-md5 "template_bloat_html/" "$S3_BUCKET_PATH/template_bloat_html/"
TEMPLATE_BLOAT_TREEMAP_URL=$S3_URL_PREFIX/template_bloat_html/index.html
TEMPLATE_BLOAT_TREEMAP_URL=$S3_URL_PREFIX/template_bloat_html/tree_map.html
echo "[template bloat]($TEMPLATE_BLOAT_TREEMAP_URL) ([sorted by size]($TEMPLATE_BLOAT_BY_SIZE_URL), [sorted by count]($TEMPLATE_BLOAT_BY_COUNT_URL))" >> $GITHUB_STEP_SUMMARY
s3cmd sync -r --acl-public --stats --no-progress --no-mime-magic --guess-mime-type --no-check-md5 "html_cpp_impact/" "$S3_BUCKET_PATH/html_cpp_impact/"
echo "[cpp compilation time]($S3_URL_PREFIX/html_cpp_impact/index.html)" >> $GITHUB_STEP_SUMMARY
echo "[cpp compilation time]($S3_URL_PREFIX/html_cpp_impact/tree_map.html)" >> $GITHUB_STEP_SUMMARY
s3cmd sync -r --acl-public --stats --no-progress --no-mime-magic --guess-mime-type --no-check-md5 "html_headers_impact/" "$S3_BUCKET_PATH/html_headers_impact/"
echo "[headers impact]($S3_URL_PREFIX/html_headers_impact/index.html)" >> $GITHUB_STEP_SUMMARY
echo "[headers impact]($S3_URL_PREFIX/html_headers_impact/tree_map.html)" >> $GITHUB_STEP_SUMMARY
7 changes: 7 additions & 0 deletions .github/actions/s3cmd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ runs:
host_base = storage.yandexcloud.net
host_bucket = %(bucket)s.storage.yandexcloud.net
EOF
# specify mime type for correct content-type in s3cmd sync
# we want to .out/.err files treat as text
MIME_TYPES_LINE="text/plain out err log"
MIME_TYPES_FILE='/etc/mime.types'
# add if not exists
sudo bash -c "grep -qF -- '$MIME_TYPES_LINE' '$MIME_TYPES_FILE' || echo '$MIME_TYPES_LINE' >> '$MIME_TYPES_FILE'"
env:
s3_key_id: ${{ inputs.s3_key_id }}
s3_secret_access_key: ${{ inputs.s3_key_secret }}
Expand Down
Loading

0 comments on commit 22b269b

Please sign in to comment.