forked from lightseekorg/smg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbenchmark-request-processing.yml
More file actions
80 lines (70 loc) · 2.17 KB
/
benchmark-request-processing.yml
File metadata and controls
80 lines (70 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Benchmark - Request Processing
on:
push:
branches: [ main ]
paths:
- 'model_gateway/benches/request_processing.rs'
- 'model_gateway/src/routers/**'
- 'model_gateway/src/core/**'
- 'model_gateway/src/middleware.rs'
- '!model_gateway/src/**/tests/**'
- '!model_gateway/src/**/*_test.rs'
- '!model_gateway/src/**/test_*.rs'
pull_request:
branches: [ main ]
paths:
- 'model_gateway/benches/request_processing.rs'
- 'model_gateway/src/routers/**'
- 'model_gateway/src/core/**'
- 'model_gateway/src/middleware.rs'
- '!model_gateway/src/**/tests/**'
- '!model_gateway/src/**/*_test.rs'
- '!model_gateway/src/**/test_*.rs'
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
concurrency:
group: benchmark-request-processing-${{ github.ref }}
cancel-in-progress: true
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
permissions:
contents: read
jobs:
benchmark:
name: Request Processing
if: github.repository == 'lightseekorg/smg'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 100
- name: Setup Rust
uses: ./.github/actions/setup-rust
- name: Run benchmark
timeout-minutes: 40
run: |
source "$HOME/.cargo/env"
cargo bench --bench request_processing -- benchmark_summary --exact 2>&1 | tee benchmark_output.txt
- name: Upload benchmark results
if: always()
uses: actions/upload-artifact@v6
with:
name: request-processing-results-${{ github.sha }}
path: |
target/criterion/benchmark_summary/
benchmark_output.txt
retention-days: 30
- name: Show sccache stats
if: always()
run: sccache --show-stats || true
- name: Summary
if: always()
run: |
echo "## Request Processing Benchmark" >> $GITHUB_STEP_SUMMARY
if [ -f benchmark_output.txt ]; then
echo '```' >> $GITHUB_STEP_SUMMARY
tail -60 benchmark_output.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
fi