Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(perf): support performance api #3341

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d92e048
fix(perf): support performance api
Jun 8, 2023
2fb52f5
fix(perf): support performance api
Jun 8, 2023
49129b8
fix(perf): support performance api
Jun 8, 2023
97120ad
fix(perf): support performance api
Jun 9, 2023
55adca2
fix(perf): support performance api
Jun 9, 2023
ad14473
fix(perf): support performance api
Jun 9, 2023
760bf8b
feat(ios): add bridge time point performance
ozonelmy Jun 9, 2023
6935879
fix(perf): support performance api
Jun 9, 2023
a824bba
fix(perf): support performance api
Jun 9, 2023
e99bf53
Merge branch 'v3.0-dev' into performance_api
Jun 12, 2023
5b5b7f1
fix(perf): support performance api
Jun 13, 2023
17cd64c
Merge branch 'v3.0-dev' into performance_api
Jun 13, 2023
0654974
feat(ios): remove old ios performance logger
ozonelmy Jun 12, 2023
118f443
feat(ios): add performance point for engine start/end
ozonelmy Jun 14, 2023
fc6e169
fix(perf): support performance api
Jun 14, 2023
148ec7d
feat(ios): engine init point and execute source point and resource point
ozonelmy Jun 14, 2023
aae5494
Merge branch 'v3.0-dev' into performance_api
Jun 15, 2023
68a82bb
fix(perf): support performance api
Jun 15, 2023
2984f6e
fix(perf): support performance api
Jun 15, 2023
d960294
Merge branch 'v3.0-dev' into performance_api
Jun 15, 2023
d3ea62c
feat(ios): add first frame naviation timing point
ozonelmy Jun 16, 2023
62b0f62
Merge branch 'v3.0-dev' into performance_api
Jun 20, 2023
41e39d1
fix(perf): support performance api
Jun 20, 2023
7d44234
fix(perf): support performance api
Jun 20, 2023
cc6fc6a
fix(perf): support performance api
Jun 20, 2023
6fb5162
feat(android): add performace impl
siguangli2018 Jun 21, 2023
558fd8a
fix(perf): support performance api
Jun 21, 2023
4620839
Merge branch 'v3.0-dev' into performance_api
Jun 21, 2023
0ff0e7b
feat(ios): fix conflicts & add performance api
ozonelmy Jun 22, 2023
78fb529
feat(ios): add performance api
ozonelmy Jun 22, 2023
e503914
fix(android): remove OnNativeInitStart interface
siguangli2018 Jun 25, 2023
b7f0f59
fix(perf): support performance api
Jun 25, 2023
4ff2c0b
feat(ios): update ios navigation timing report
ozonelmy Jun 25, 2023
420ba1e
Merge branch 'v3.0-dev' into performance_api
Jun 25, 2023
af225d3
feat(docs): add vue-next integration doc
gguoyu Jun 29, 2023
e4fdbef
feat(docs): update vue-next integration doc
gguoyu Jun 29, 2023
58fd6a9
perf(ios): reduce call of waterfall reload method frequency
ozonelmy Jun 29, 2023
cddd2a6
fix(ios): fixed a bug where the extracomponents did not take effect
ozonelmy Jun 29, 2023
1a34398
chore(action): add github release and compare action
zealotchen0 Jun 29, 2023
cac965f
fix(ios): add semaphore to make sure scope is created
ozonelmy Jun 29, 2023
dc5d36d
Merge branch 'v3.0-dev' into performance_api
etkmao Jun 30, 2023
2c01183
fix(ios): fix correct copyright header
etkmao Jun 30, 2023
d9ded26
fix(jsc): fix jsc crash on ios12
etkmao Jul 3, 2023
13ef5f9
Merge branch 'main' into performance_api
etkmao Jul 3, 2023
54071e4
refactor(core): reduce header file dependencies
ozonelmy Jun 30, 2023
94135b0
Merge branch 'main' into performance_api
etkmao Jul 3, 2023
6e72a07
chore(ios): add pod spec lint workflow file
ozonelmy Jul 3, 2023
a802e22
fix(ios): remove the semicolon after namespace syntax
ozonelmy Jul 3, 2023
f261ef0
feat(voltron): update workflow xcode version
henryjin0511 Jul 3, 2023
851318d
Merge branch 'main' into performance_api
etkmao Jul 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/pod_spec_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: '[pods] pod spec lint'

on:
pull_request:
branches:
- main
paths:
- 'framework/ios/**'
- 'framework/examples/ios-demo/**'
- 'driver/js/src/**'
- 'driver/js/include/**'
- 'dom/include/**'
- 'dom/src/**'
- 'layout/engine/**'
- 'modules/ios/**'
- 'modules/footstone/**'
- 'modules/vfs/ios/**'
- 'modules/vfs/native/**'
- 'renderer/native/ios/**'
- 'devtools/devtools-backend/**'

jobs:
pod_spec_lint:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
- name: Pod Spec Lint
run: |
pod spec lint hippy.podspec --allow-warnings --use-libraries --verbose --skip-import-validation
32 changes: 32 additions & 0 deletions .github/workflows/pod_spec_lint_bypass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: '[pods] pod spec lint'

on:
pull_request:
branches:
- main
paths-ignore:
- 'framework/ios/**'
- 'framework/examples/ios-demo/**'
- 'driver/js/src/**'
- 'driver/js/include/**'
- 'dom/include/**'
- 'dom/src/**'
- 'layout/engine/**'
- 'modules/ios/**'
- 'modules/footstone/**'
- 'modules/vfs/ios/**'
- 'modules/vfs/native/**'
- 'renderer/native/ios/**'
- 'devtools/devtools-backend/**'

jobs:
pod_spec_lint:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
- name: Pod_Spec_Lint_Bypass
run: |
echo "No Pod Spec Lint required"
154 changes: 154 additions & 0 deletions .github/workflows/project_artifact_compare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
name: "[project] artifact compare"

on:
workflow_dispatch:
inputs:
git_ref_a:
description: 'Git Ref A'
type: string
required: true
git_ref_b:
description: 'Git Ref B(contrast)'
type: string
required: false
is_compare_for_android:
description: 'Compare for Android artifact'
type: boolean
default: true
required: true
is_compare_for_ios:
description: 'Compare for iOS artifact'
type: boolean
default: true
required: true

jobs:
android:
if: ${{ github.event.inputs.is_compare_for_android == 'true' }}
runs-on: ${{ github.repository == 'Tencent/Hippy' && fromJson('[''self-hosted'', ''linux'']') || 'ubuntu-latest' }}
container:
image: ghcr.io/tencent/android-release:latest # repository name must be lowercase(${{ github.repository_owner }})
strategy:
matrix:
ref: ${{ fromJSON(format('[''{0}'', ''{1}'']', github.event.inputs.git_ref_a, github.event.inputs.git_ref_b)) }}
include:
- ref: ${{ github.event.inputs.git_ref_a }}
source: ref_a
- ref: ${{ github.event.inputs.git_ref_b }}
source: ref_b
defaults:
run:
shell: bash
outputs:
ref_a: ${{ steps.get_size.outputs.ref_a }}
ref_b: ${{ steps.get_size.outputs.ref_b }}
artifact: Android(android-sdk.aar)
steps:
- name: Checkout
if: ${{ matrix.ref }}
uses: actions/checkout@v3
with:
ref: ${{ matrix.ref }}
lfs: true
- name: Build
if: ${{ matrix.ref }}
run: |
./gradlew assembleRelease -PINCLUDE_ABI_X86=true -PINCLUDE_ABI_X86_64=true
- name: Size
id: get_size
run: |
if [[ "${{ matrix.ref }}" ]]; then
echo "${{ matrix.source }}=$(ls -l ./android/sdk/build/outputs/aar/android-sdk.aar | awk '{print $5}')" >> $GITHUB_OUTPUT
else
echo "${{ matrix.source }}=-1" >> $GITHUB_OUTPUT
fi

ios:
if: ${{ github.event.inputs.is_compare_for_ios == 'true' }}
runs-on: macos-latest
strategy:
matrix:
ref: ${{ fromJSON(format('[''{0}'', ''{1}'']', github.event.inputs.git_ref_a, github.event.inputs.git_ref_b)) }}
include:
- ref: ${{ github.event.inputs.git_ref_a }}
source: ref_a
- ref: ${{ github.event.inputs.git_ref_b }}
source: ref_b
outputs:
ref_a: ${{ steps.get_size.outputs.ref_a }}
ref_b: ${{ steps.get_size.outputs.ref_b }}
artifact: iOS(libhippy.a)
steps:
- name: Checkout
if: ${{ matrix.ref }}
uses: actions/checkout@v3
with:
ref: ${{ matrix.ref }}
lfs: true
- name: Build
if: ${{ matrix.ref }}
run: |
pushd examples/ios-demo
pod install
popd
xcodebuild build \
-destination 'generic/platform=iOS' \
-project '_Pods.xcodeproj' \
-scheme 'hippy' \
-configuration 'Release' \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Size
id: get_size
run: |
if [[ "${{ matrix.ref }}" ]]; then
echo "${{ matrix.source }}=$(ls -l $(xcodebuild -scheme 'hippy' -showBuildSettings | grep -m 1 TARGET_BUILD_DIR | grep -oEi "\/.*")/libhippy.a | awk '{print $5}')" >> $GITHUB_OUTPUT
else
echo "${{ matrix.source }}=-1" >> $GITHUB_OUTPUT
fi

collector:
needs: [ android, ios ]
if: ${{ always() && contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) }}
runs-on: ubuntu-latest
steps:
- name: Summary
shell: python
run: |
from os import getenv
from json import loads

def sizeof_fmt(num):
if num == 0:
return "0"
for unit in ["", "K", "M", "G", "T", "P", "E", "Z"]:
if abs(num) < 1024.0:
return f"{num:3.2f}{unit}"
num /= 1024.0
return f"{num:.1f}Yi"

def delta(a, b):
num = a - b
return "$$\color{%s}{%s%s (%s)}$$" % ("red" if num > 0 else "green", "+" if num > 0 else "", sizeof_fmt(num), "%.2f\\\\%%" % abs(num / a * 100))

json = loads("""${{ toJSON(needs.*.outputs) }}""")
with open(getenv("GITHUB_STEP_SUMMARY"), 'w', encoding='utf-8') as file:
for result in json:
if "artifact" in result:
ref_a = int(result["ref_a"])
ref_b = int(result["ref_b"])
if ref_a > 0 and ref_b > 0:
file.write("## %s Artifact Compare\n" % result["artifact"])
file.write("| Ref | Size | Delta |\n")
file.write("|------|------|-------|\n")
file.write("| %s | %s | %s |\n" % ("${{ github.event.inputs.git_ref_a }}", sizeof_fmt(ref_a), delta(ref_a, ref_b)))
file.write("| %s | %s | %s |\n" % ("${{ github.event.inputs.git_ref_b }}", sizeof_fmt(ref_b), delta(ref_b, ref_a)))
file.write("\n")
elif ref_a > 0:
ref_a = int(result["ref_a"])
file.write("## %s Artifact\n" % result["artifact"])
file.write("| Ref | Size |\n")
file.write("|------|------|\n")
file.write("| %s | %s |\n" % ("${{ github.event.inputs.git_ref_a }}", sizeof_fmt(ref_a)))
file.write("\n")
Loading
Loading