Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
d8fcbaa3
"vscode:/vscode.git/clone" did not exist on "f3310e68e53db66d780123c91a3146bd5f8e4839"
Unverified
Commit
d8fcbaa3
authored
Oct 31, 2025
by
Xiaoyu Zhang
Committed by
GitHub
Oct 30, 2025
Browse files
[CI Monitor] Fix ci_monitor perf analyzer bug (#12281)
parent
2cf3d0f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
25 deletions
+27
-25
.github/workflows/ci-monitor.yml
.github/workflows/ci-monitor.yml
+2
-1
scripts/ci_monitor/ci_analyzer.py
scripts/ci_monitor/ci_analyzer.py
+15
-19
scripts/ci_monitor/ci_analyzer_perf.py
scripts/ci_monitor/ci_analyzer_perf.py
+10
-5
No files found.
.github/workflows/ci-monitor.yml
View file @
d8fcbaa3
...
...
@@ -2,7 +2,7 @@ name: CI Monitor
on
:
schedule
:
-
cron
:
'
0
*/12
*
*
*'
# Every 12 hours for main analysis
-
cron
:
'
0
*/12
*
*
*'
# Every 12 hours for main analysis
workflow_dispatch
:
inputs
:
limit
:
...
...
@@ -65,6 +65,7 @@ jobs:
retention-days
:
30
ci-monitor-balance
:
needs
:
ci-monitor
if
:
github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
runs-on
:
ubuntu-latest
steps
:
...
...
scripts/ci_monitor/ci_analyzer.py
View file @
d8fcbaa3
...
...
@@ -382,15 +382,13 @@ class SGLangCIAnalyzer:
try
:
github_step_summary
=
os
.
environ
.
get
(
"GITHUB_STEP_SUMMARY"
)
if
not
github_step_summary
:
print
(
"
ℹ️
Not running in GitHub Actions, skipping summary generation"
)
print
(
"Not running in GitHub Actions, skipping summary generation"
)
return
print
(
"
📊
Generating GitHub Actions summary for CI Analysis..."
)
print
(
"Generating GitHub Actions summary for CI Analysis..."
)
summary_lines
=
[]
summary_lines
.
append
(
"# 🔍 SGLang CI Analysis Report (Target Workflows Only)"
)
summary_lines
.
append
(
"# SGLang CI Analysis Report (Target Workflows Only)"
)
summary_lines
.
append
(
""
)
total
=
stats
[
"total_runs"
]
...
...
@@ -400,26 +398,24 @@ class SGLangCIAnalyzer:
skipped
=
stats
[
"skipped_runs"
]
success_rate
=
(
success
/
total
*
100
)
if
total
>
0
else
0
summary_lines
.
append
(
"##
📊
Overall Statistics"
)
summary_lines
.
append
(
"## Overall Statistics"
)
summary_lines
.
append
(
""
)
summary_lines
.
append
(
"| Metric | Count | Percentage |"
)
summary_lines
.
append
(
"|--------|-------|------------|"
)
summary_lines
.
append
(
f
"| Total Runs |
{
total
}
| 100% |"
)
summary_lines
.
append
(
f
"| ✅ Successful |
{
success
}
|
{
success
/
total
*
100
:.
1
f
}
% |"
)
summary_lines
.
append
(
f
"| ❌ Failed |
{
failed
}
|
{
failed
/
total
*
100
:.
1
f
}
% |"
)
summary_lines
.
append
(
f
"| 🚫 Cancelled |
{
cancelled
}
|
{
cancelled
/
total
*
100
:.
1
f
}
% |"
f
"| Successful |
{
success
}
|
{
success
/
total
*
100
:.
1
f
}
% |"
)
summary_lines
.
append
(
f
"| Failed |
{
failed
}
|
{
failed
/
total
*
100
:.
1
f
}
% |"
)
summary_lines
.
append
(
f
"|
⏭️ Skipped |
{
skipped
}
|
{
skipp
ed
/
total
*
100
:.
1
f
}
% |"
f
"|
Cancelled |
{
cancelled
}
|
{
cancell
ed
/
total
*
100
:.
1
f
}
% |"
)
summary_lines
.
append
(
f
"| Skipped |
{
skipped
}
|
{
skipped
/
total
*
100
:.
1
f
}
% |"
)
summary_lines
.
append
(
f
"| **Success Rate** | **
{
success_rate
:.
1
f
}
%** | - |"
)
summary_lines
.
append
(
""
)
if
stats
[
"category_failures"
]:
summary_lines
.
append
(
"##
📁
Category Failure Statistics"
)
summary_lines
.
append
(
"## Category Failure Statistics"
)
summary_lines
.
append
(
""
)
summary_lines
.
append
(
"| Category | Failures |"
)
summary_lines
.
append
(
"|----------|----------|"
)
...
...
@@ -430,7 +426,7 @@ class SGLangCIAnalyzer:
summary_lines
.
append
(
""
)
if
stats
[
"job_failures"
]:
summary_lines
.
append
(
"##
🔴
Most Frequently Failed Jobs (Top 20)"
)
summary_lines
.
append
(
"## Most Frequently Failed Jobs (Top 20)"
)
summary_lines
.
append
(
""
)
top_failures
=
sorted
(
...
...
@@ -457,7 +453,7 @@ class SGLangCIAnalyzer:
pr_text
=
f
" by
{
pr_info
[
'author'
]
}
"
summary_lines
.
append
(
f
"
✅
**Last Success:** [Run #
{
last_success
[
'run_number'
]
}
](
{
last_success
[
'url'
]
}
) (
{
success_date
.
strftime
(
'%Y-%m-%d %H:%M'
)
}
)
{
pr_text
}
"
f
"**Last Success:** [Run #
{
last_success
[
'run_number'
]
}
](
{
last_success
[
'url'
]
}
) (
{
success_date
.
strftime
(
'%Y-%m-%d %H:%M'
)
}
)
{
pr_text
}
"
)
summary_lines
.
append
(
""
)
...
...
@@ -465,7 +461,7 @@ class SGLangCIAnalyzer:
job
in
stats
[
"job_failure_links"
]
and
stats
[
"job_failure_links"
][
job
]
):
summary_lines
.
append
(
"
❌
**Recent Failures:**"
)
summary_lines
.
append
(
"**Recent Failures:**"
)
for
link_info
in
stats
[
"job_failure_links"
][
job
]:
created_at
=
datetime
.
fromisoformat
(
link_info
[
"created_at"
].
replace
(
"Z"
,
"+00:00"
)
...
...
@@ -484,7 +480,7 @@ class SGLangCIAnalyzer:
summary_lines
.
append
(
""
)
if
stats
[
"failure_patterns"
]:
summary_lines
.
append
(
"##
🔬
Failure Pattern Analysis"
)
summary_lines
.
append
(
"## Failure Pattern Analysis"
)
summary_lines
.
append
(
""
)
summary_lines
.
append
(
"| Pattern | Count |"
)
summary_lines
.
append
(
"|---------|-------|"
)
...
...
@@ -498,10 +494,10 @@ class SGLangCIAnalyzer:
f
.
write
(
"
\n
"
.
join
(
summary_lines
))
f
.
write
(
"
\n\n
---
\n\n
"
)
print
(
"
✅
GitHub Actions summary generated successfully"
)
print
(
"GitHub Actions summary generated successfully"
)
except
Exception
as
e
:
print
(
f
"
❌
Failed to generate GitHub Actions summary:
{
e
}
"
)
print
(
f
"Failed to generate GitHub Actions summary:
{
e
}
"
)
def
main
():
...
...
scripts/ci_monitor/ci_analyzer_perf.py
View file @
d8fcbaa3
...
...
@@ -612,18 +612,23 @@ class SGLangPerfAnalyzer:
total_runs
=
len
(
runs
)
for
i
,
run
in
enumerate
(
runs
,
1
):
print
(
f
"Processing run
{
i
}
/
{
total_runs
}
: #
{
run
.
get
(
'run_number'
)
}
"
)
if
not
isinstance
(
run
,
dict
):
print
(
f
" Warning: run #
{
i
}
is not a dict, skipping."
)
continue
run_info
=
{
"run_number"
:
run
.
get
(
"run_number"
),
"created_at"
:
run
.
get
(
"created_at"
),
"head_sha"
:
run
.
get
(
"head_sha"
,
""
)[:
8
],
"author"
:
run
.
get
(
"head_commit"
,
{})
.
get
(
"author"
,
{})
.
get
(
"name"
,
"Unknown"
),
"head_sha"
:
(
run
.
get
(
"head_sha"
)
or
""
)[:
8
],
"author"
:
"Unknown"
,
"pr_number"
:
None
,
"url"
:
f
"https://github.com/
{
self
.
repo
}
/actions/runs/
{
run
.
get
(
'id'
)
}
"
,
}
head_commit
=
run
.
get
(
"head_commit"
,
{})
if
isinstance
(
head_commit
,
dict
):
run_info
[
"author"
]
=
head_commit
.
get
(
"author"
,
{}).
get
(
"name"
,
"Unknown"
)
# Extract PR number
pull_requests
=
run
.
get
(
"pull_requests"
,
[])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment