[GitHub] [apisix] tzssangglass commented on a change in pull request #6136: ci: support for generating flame graph

2022-02-13 Thread GitBox


tzssangglass commented on a change in pull request #6136:
URL: https://github.com/apache/apisix/pull/6136#discussion_r805567341



##
File path: .github/workflows/performance.yml
##
@@ -0,0 +1,56 @@
+name: Performance Test
+
+on:
+  pull_request:
+branches: [master, 'release/**']
+paths-ignore:
+  - 'docs/**'
+  - '**/*.md'
+
+jobs:
+  performance:
+if: github.event_name == 'pull_request' || github.event.label.name == 
'performance'

Review comment:
   > We can apply a label if needed
   
   Now this PR is satisfied, add `performance` and it will run. To run it again 
you need to remove `performance` and add it again.
   
   > Note that people can run anything based on their PR.
   
   Yes, the idealization is so. But this requires continued enhancements to the 
performance testing framework.
   Maybe we can change it the next time we need to run performance tests for 
other PRs.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] tzssangglass commented on a change in pull request #6136: ci: support for generating flame graph

2022-02-13 Thread GitBox


tzssangglass commented on a change in pull request #6136:
URL: https://github.com/apache/apisix/pull/6136#discussion_r805336977



##
File path: .github/workflows/performance.yml
##
@@ -0,0 +1,56 @@
+name: Performance Test
+
+on:
+  pull_request:
+branches: [master, 'release/**']
+paths-ignore:
+  - 'docs/**'
+  - '**/*.md'
+
+jobs:
+  performance:
+if: github.event_name == 'pull_request' || github.event.label.name == 
'performance'

Review comment:
   Yes. However, the current test case only contains jwt-auth, and I feel 
that it seems too early to combine the user's PR with the test case. It would 
be nice to have targeted tests for the user's PR. Do you have any suggestions?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] tzssangglass commented on a change in pull request #6136: ci: support for generating flame graph

2022-02-13 Thread GitBox


tzssangglass commented on a change in pull request #6136:
URL: https://github.com/apache/apisix/pull/6136#discussion_r805336977



##
File path: .github/workflows/performance.yml
##
@@ -0,0 +1,56 @@
+name: Performance Test
+
+on:
+  pull_request:
+branches: [master, 'release/**']
+paths-ignore:
+  - 'docs/**'
+  - '**/*.md'
+
+jobs:
+  performance:
+if: github.event_name == 'pull_request' || github.event.label.name == 
'performance'

Review comment:
   Yes. However, the current test case only contains jwt-auth, and I feel 
that it seems too early to combine the user's PR with the test case. It would 
be nice to have targeted tests for the user's PR. Do you have any suggestions?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] tzssangglass commented on a change in pull request #6136: ci: support for generating flame graph

2022-02-10 Thread GitBox


tzssangglass commented on a change in pull request #6136:
URL: https://github.com/apache/apisix/pull/6136#discussion_r803657570



##
File path: .gitmodules
##
@@ -7,3 +7,6 @@
 [submodule "t/grpc_server_example"]
path = t/grpc_server_example
url = https://github.com/api7/grpc_server_example
+[submodule ".github/actions/action-create-comment"]
+   path = .github/actions/action-create-comment
+   url = https://github.com/actions-ecosystem/action-create-comment

Review comment:
   rm it




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] tzssangglass commented on a change in pull request #6136: ci: support for generating flame graph

2022-02-09 Thread GitBox


tzssangglass commented on a change in pull request #6136:
URL: https://github.com/apache/apisix/pull/6136#discussion_r803229254



##
File path: .github/workflows/performance.yml
##
@@ -0,0 +1,56 @@
+name: Performance Test
+
+on:
+  pull_request:
+branches: [master, 'release/**']
+paths-ignore:
+  - 'docs/**'
+  - '**/*.md'
+
+jobs:
+  performance:
+if: github.event_name == 'pull_request' || github.event.label.name == 
'performance'
+runs-on: ubuntu-18.04
+timeout-minutes: 45
+
+steps:
+  - name: Check out code
+uses: actions/checkout@v2.4.0
+with:
+  submodules: recursive
+
+  - name: Cache deps
+uses: actions/cache@v2.1.7
+env:
+  cache-name: cache-deps
+with:
+  path: deps
+  key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name 
}}-${{ hashFiles('rockspec/apisix-master-0.rockspec') }}
+
+  - name: Install Dependencies
+run: sudo ./ci/performance_test.sh install_dependencies
+
+  - name: Install wrk2
+run: sudo ./ci/performance_test.sh install_wrk2
+
+  - name: Install SystemTap Tools
+run: sudo ./ci/performance_test.sh install_stap_tools
+
+  - name: Perf Test
+run: ./ci/performance_test.sh run_performance_test

Review comment:
   Tried it before and it didn't fit




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] tzssangglass commented on a change in pull request #6136: ci: support for generating flame graph

2022-01-19 Thread GitBox


tzssangglass commented on a change in pull request #6136:
URL: https://github.com/apache/apisix/pull/6136#discussion_r788278934



##
File path: ci/performance_test.sh
##
@@ -0,0 +1,117 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+. ./ci/common.sh
+
+set -ex
+
+install_dependencies() {
+apt-get -y update --fix-missing
+apt-get -y install lua5.1 liblua5.1-0-dev libldap2-dev
+export_or_prefix
+export OPENRESTY_VERSION=source
+./utils/linux-install-openresty.sh
+bash utils/install-dependencies.sh install_luarocks
+make deps
+}
+
+install_wrk2() {
+cd ..
+git clone https://github.com/giltene/wrk2
+cd wrk2 || true
+make
+ln -s $PWD/wrk /usr/bin
+cd ..
+}
+
+install_stap_tools() {
+# install ddeb source repo
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 
C8CAB6595FDFF622
+
+codename=$(lsb_release -c | awk  '{print $2}')
+sudo tee /etc/apt/sources.list.d/ddebs.list << EOF
+deb http://ddebs.ubuntu.com/ ${codename}  main restricted universe 
multiverse
+deb http://ddebs.ubuntu.com/ ${codename}-updates  main restricted universe 
multiverse
+deb http://ddebs.ubuntu.com/ ${codename}-proposed main restricted universe 
multiverse
+EOF
+
+sudo apt-get update
+sudo apt-get install linux-image-$(uname -r)-dbgsym
+sudo apt install elfutils libdw-dev
+sudo apt-get install -y python3-setuptools python3-wheel
+
+# install systemtap
+cd /usr/local/
+wget http://sourceware.org/systemtap/ftp/releases/systemtap-4.6.tar.gz
+tar -zxf systemtap-4.6.tar.gz
+mv systemtap-4.6 systemtap
+cd systemtap
+./configure && make all && sudo make install &&  stap --version
+cd ..
+
+# see https://github.com/openresty/stapxx/pull/48
+git clone https://github.com/api7/stapxx.git -b luajit-gc64
+git clone https://github.com/openresty/openresty-systemtap-toolkit.git
+git clone https://github.com/brendangregg/FlameGraph.git
+}
+
+
+run_performance_test() {
+sudo chmod -R 777 ./
+ulimit -n 10240
+
+pip3 install -r t/perf/requirements.txt --user
+
+#openresty-debug
+export OPENRESTY_PREFIX="/usr/local/openresty-debug"
+export 
PATH=$OPENRESTY_PREFIX/nginx/sbin:$OPENRESTY_PREFIX/bin:$OPENRESTY_PREFIX/luajit/bin:$PATH
+
+mkdir output
+python3 ./t/perf/test_http.py >$PWD/output/performance.txt 2>&1 &

Review comment:
   yes, `duration` is 100s




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org