-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6078a37
commit 9d700f5
Showing
11 changed files
with
208 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Copyright 2021 iLogtail Authors | ||
# | ||
# Licensed 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. | ||
|
||
name: Benchmark | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'example_config/**' | ||
- 'docker/**' | ||
- 'k8s_template/**' | ||
- 'changes/**' | ||
- 'licenses/**' | ||
- 'CHANGELOG.md' | ||
push: | ||
branches: | ||
- main | ||
- 1.* | ||
jobs: | ||
CI: | ||
runs-on: ${{ matrix.runner }} | ||
timeout-minutes: 60 | ||
strategy: | ||
matrix: | ||
go-version: [ 1.19.10 ] | ||
runner: [ ubuntu-latest ] | ||
fail-fast: true | ||
steps: | ||
# Clean up space to prevent action from running out of disk space. | ||
- name: clean | ||
if: matrix.runner == 'ubuntu-latest' | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
sudo -E apt-get -qq autoremove --purge | ||
sudo -E apt-get -qq clean | ||
- name: Check disk space | ||
run: | | ||
df -hT $PWD | ||
- name: Set up Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Update Docker-compose to v2 | ||
run: | | ||
sudo curl -SL https://github.com/docker/compose/releases/download/v2.7.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
- name: System environment | ||
run: | | ||
uname -r | ||
docker --version | ||
go version | ||
- name: Run benchmark | ||
env: | ||
BUILD_LOGTAIL_UT: OFF | ||
WITHOUTGDB: ON | ||
run: make benchmark | ||
|
||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: benchmark | ||
tool: "customSmallerIsBetter" | ||
output-file-path: "test/benchmark/report/combined_benchmark.json" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
auto-push: true | ||
|
||
result: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
needs: [ CI ] | ||
steps: | ||
- name: Build Result | ||
run: echo "Just to make the GitHub merge button green" |
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,24 @@ | ||
#!/bin/bash | ||
|
||
# Define the input files and the output file | ||
input_files=($(find test/benchmark/report -type f -name '*benchmark.json')) | ||
output_file="test/benchmark/report/combined_benchmark.json" | ||
|
||
# Start the output file with an opening square bracket | ||
rm -f "$output_file" | ||
touch "$output_file" | ||
echo '[' > "$output_file" | ||
|
||
# Loop through each input file | ||
for i in "${!input_files[@]}"; do | ||
# Read the file, remove the first and last line (the square brackets), and append to the output file | ||
cat "${input_files[$i]}" | sed '1d;$d' >> "$output_file" | ||
|
||
# If this is not the last file, append a comma to separate the arrays | ||
if [ $i -lt $((${#input_files[@]} - 1)) ]; then | ||
echo ',' >> "$output_file" | ||
fi | ||
done | ||
|
||
# Finish the output file with a closing square bracket | ||
echo ']' >> "$output_file" |
22 changes: 0 additions & 22 deletions
22
test/benchmark/test_cases/performance_file_to_blackhole_filebeat/docker-compose.yaml
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 |
---|---|---|
@@ -1,32 +1,10 @@ | ||
version: '3.8' | ||
|
||
services: | ||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.2 | ||
environment: | ||
- ELASTIC_PASSWORD=elastic | ||
- discovery.type=single-node | ||
- xpack.security.http.ssl.enabled=false | ||
- xpack.license.self_generated.type=trial | ||
ports: | ||
- 9200:9200 | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl -u elastic:elastic -s http://localhost:9200/_cluster/health | grep -q '\"status\":\"green\"'"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 3 | ||
restart: always | ||
|
||
filebeat: | ||
image: docker.elastic.co/beats/filebeat:8.14.2 | ||
user: root | ||
volumes: | ||
- ./filebeat.yml:/usr/share/filebeat/filebeat.yml:ro | ||
- ./a.log:/home/filebeat/a.log:ro | ||
command: filebeat -e --strict.perms=false | ||
environment: | ||
- OUTPUT_ELASTICSEARCH_HOSTS=["elasticsearch:9200"] | ||
depends_on: | ||
elasticsearch: | ||
condition: service_healthy | ||
restart: always |
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
16 changes: 11 additions & 5 deletions
16
test/benchmark/test_cases/performance_file_to_blackhole_fluentbit/main.conf
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 |
---|---|---|
@@ -1,10 +1,16 @@ | ||
[SERVICE] | ||
Parsers+File /tmp/parsers.conf | ||
parsers_file /tmp/parsers.conf | ||
|
||
[INPUT] | ||
Name tail | ||
Path /home/fluentbit/a.log | ||
name tail | ||
path /home/fluentbit/a.log | ||
parser json | ||
|
||
[FILTER] | ||
name grep | ||
match * | ||
regex user-agent no-agent | ||
|
||
[OUTPUT] | ||
Name stdout | ||
Match non | ||
name stdout | ||
match * |
2 changes: 1 addition & 1 deletion
2
test/benchmark/test_cases/performance_file_to_blackhole_fluentbit/parsers.conf
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[PARSER] | ||
Name docker | ||
Name json | ||
Format json |
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
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