Skip to content

Commit 74cd7d1

Browse files
author
cleilson pereira
committed
feat: Enhance performance analysis workflow with improved tool installation and error handling
- Replaced Binlogtool installation with MSBuild Structured Log Viewer CLI for better analysis capabilities. - Specified version for Meziantou.MSBuild.Tools during installation for consistency. - Added conditional checks for tool availability before executing commands for double-write detection and binlog analysis, improving robustness. - Updated basic binlog inspection step to provide clearer output and file information. - Enhanced summary log to include detailed artifact information and instructions for local analysis.
1 parent 6e794fc commit 74cd7d1

1 file changed

Lines changed: 34 additions & 9 deletions

File tree

.github/workflows/performance-analyzer.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,42 @@ jobs:
5858
/p:AnalysisLevel=8.0
5959
continue-on-error: true
6060

61-
- name: Install Binlogtool (global tool)
62-
run: dotnet tool install --global binlogtool --version 1.0.27
61+
- name: Install MSBuild Structured Log Viewer CLI
62+
run: dotnet tool install --global MSBuild.StructuredLogger --version 2.2.206
6363
continue-on-error: true
6464

6565
- name: Install Meziantou.MSBuild.Tools (global tool)
66-
run: dotnet tool install --global Meziantou.MSBuild.Tools
66+
run: dotnet tool install --global Meziantou.MSBuild.Tools --version 1.0.27
6767
continue-on-error: true
6868

6969
- name: Add dotnet tools to PATH
7070
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
7171

72-
- name: Detect Double‑Writes in binlog
72+
- name: Detect Double‑Writes in binlog (with fallback)
7373
run: |
74-
Meziantou.MSBuild.Tools detect-double-writes --path artifacts/build-${{ github.run_id }}.binlog
74+
if command -v Meziantou.MSBuild.Tools &> /dev/null; then
75+
echo "Attempting to detect double-writes with Meziantou.MSBuild.Tools..."
76+
Meziantou.MSBuild.Tools detect-double-writes --path artifacts/build-${{ github.run_id }}.binlog || echo "Meziantou.MSBuild.Tools failed - tool may not support this binlog version"
77+
else
78+
echo "Meziantou.MSBuild.Tools not available, skipping double-write detection"
79+
fi
7580
continue-on-error: true
7681

77-
- name: Analyze binlog for tasks and warnings (JSON report)
82+
- name: Analyze binlog with MSBuild Structured Logger
7883
run: |
79-
binlogtool analyze artifacts/build-${{ github.run_id }}.binlog --format json > artifacts/binlog-report.json
84+
if command -v StructuredLogViewer &> /dev/null; then
85+
echo "Analyzing binlog with MSBuild Structured Logger..."
86+
StructuredLogViewer artifacts/build-${{ github.run_id }}.binlog --verbosity detailed > artifacts/binlog-analysis.txt || echo "StructuredLogViewer analysis failed"
87+
else
88+
echo "StructuredLogViewer not available"
89+
fi
90+
continue-on-error: true
91+
92+
- name: Basic binlog inspection
93+
run: |
94+
echo "Basic binlog file information:"
95+
ls -la artifacts/build-${{ github.run_id }}.binlog
96+
file artifacts/build-${{ github.run_id }}.binlog || echo "file command not available"
8097
continue-on-error: true
8198

8299
- name: Upload artifacts (logs, binlog, reports)
@@ -87,5 +104,13 @@ jobs:
87104

88105
- name: Summary Log
89106
run: |
90-
echo "Artifacts disponíveis: build.binlog, profile-eval.md, binlog-report.json."
91-
echo "Use o MSBuild Structured Log Viewer local para inspeção detalhada."
107+
echo "Artifacts disponíveis:"
108+
echo "- build-${{ github.run_id }}.binlog (MSBuild binary log)"
109+
echo "- profile-eval.md (MSBuild evaluation profile)"
110+
echo "- binlog-analysis.txt (Structured log analysis, se disponível)"
111+
echo ""
112+
echo "Para análise detalhada local:"
113+
echo "- Use o MSBuild Structured Log Viewer (https://msbuildlog.com/)"
114+
echo "- Ou execute: dotnet tool install -g MSBuild.StructuredLogger"
115+
echo ""
116+
ls -la artifacts/ || echo "Erro ao listar artifacts"

0 commit comments

Comments
 (0)