Skip to content

Add .github/copilot-instructions.md#1

Merged
rustiqly merged 1 commit intomasterfrom
add/copilot-instructions
Feb 11, 2026
Merged

Add .github/copilot-instructions.md#1
rustiqly merged 1 commit intomasterfrom
add/copilot-instructions

Conversation

@rustiqly
Copy link
Owner

Add Copilot custom instructions to help AI coding agents work more effectively in this repo.

Includes: project overview, architecture, build/test instructions, PR guidelines, coding conventions, and common gotchas.

@rustiqly rustiqly merged commit 82f7ff6 into master Feb 11, 2026
rustiqly added a commit that referenced this pull request Mar 4, 2026
- Use free -m with division instead of free -g to avoid rounding (#1)
- Add = and ?= to Makefile dependency regex patterns (sonic-net#2, sonic-net#7)
- CPU calculation now uses /proc/stat delta (two reads) (sonic-net#3, sonic-net#14)
- Fix misleading 'critical path estimate' comment (sonic-net#4)
- Fix parallelism timeline comment (60s not 10s) (sonic-net#5)
- Include after-relationship packages in fan stats (sonic-net#6)
- Guard disk I/O division by zero when INTERVAL<=1 (sonic-net#8)
- Remove unused elapsed_line variable (sonic-net#9)
- Remove redundant LIBSWSSCOMMON_DBG check (sonic-net#10)
- Remove active_make_jobs from CSV header comment (sonic-net#11)
- Wire up _RDEPENDS parsing to build reverse deps (sonic-net#12)
- Remove unnecessary 'if v' filter on rdeps JSON (sonic-net#13)
- Remove unused REPORT_FORMAT parameter (sonic-net#15)
- Add cycle detection to critical path algorithm (sonic-net#16)
- Add execute permission check for companion scripts (sonic-net#17)

Signed-off-by: Rustiqly <[email protected]>
rustiqly added a commit that referenced this pull request Mar 5, 2026
…net#25643)

* [build] Add build timing report and dependency analysis tools

Add three scripts for build performance instrumentation:

- scripts/build-timing-report.sh: Parse per-package timing from build
  logs (HEADER/FOOTER timestamps), generate sorted duration table,
  phase breakdown, parallelism timeline, and CSV export.

- scripts/build-dep-graph.py: Parse rules/*.mk dependency graph,
  compute critical path, fan-out/fan-in bottleneck analysis, and
  generate DOT/JSON output for visualization.

- scripts/build-resource-monitor.sh: Sample CPU, memory, disk I/O,
  and Docker container count during builds for resource utilization
  analysis.

Add "make build-report" target to slave.mk that runs the timing
report and dependency analysis after a build completes.

Example output from a VS build on 24-core/30GB machine:
- 210 packages built in 53m wall time (173m CPU)
- Max concurrency: 5 (with SONIC_CONFIG_BUILD_JOBS=4)
- Critical path: 14 packages deep (libnl -> libswsscommon -> utilities)
- Top bottleneck: LIBSWSSCOMMON with 48 downstream dependents

Signed-off-by: Rustiqly <[email protected]>

* Address Copilot review: fix 17 bugs in build analysis scripts

- Use free -m with division instead of free -g to avoid rounding (#1)
- Add = and ?= to Makefile dependency regex patterns (sonic-net#2, sonic-net#7)
- CPU calculation now uses /proc/stat delta (two reads) (sonic-net#3, sonic-net#14)
- Fix misleading 'critical path estimate' comment (sonic-net#4)
- Fix parallelism timeline comment (60s not 10s) (sonic-net#5)
- Include after-relationship packages in fan stats (sonic-net#6)
- Guard disk I/O division by zero when INTERVAL<=1 (sonic-net#8)
- Remove unused elapsed_line variable (sonic-net#9)
- Remove redundant LIBSWSSCOMMON_DBG check (sonic-net#10)
- Remove active_make_jobs from CSV header comment (sonic-net#11)
- Wire up _RDEPENDS parsing to build reverse deps (sonic-net#12)
- Remove unnecessary 'if v' filter on rdeps JSON (sonic-net#13)
- Remove unused REPORT_FORMAT parameter (sonic-net#15)
- Add cycle detection to critical path algorithm (sonic-net#16)
- Add execute permission check for companion scripts (sonic-net#17)

Signed-off-by: Rustiqly <[email protected]>

---------

Signed-off-by: Rustiqly <[email protected]>
Co-authored-by: Rustiqly <[email protected]>
rustiqly added a commit that referenced this pull request Mar 5, 2026
- Use free -m with division instead of free -g to avoid rounding (#1)
- Add = and ?= to Makefile dependency regex patterns (sonic-net#2, sonic-net#7)
- CPU calculation now uses /proc/stat delta (two reads) (sonic-net#3, sonic-net#14)
- Fix misleading 'critical path estimate' comment (sonic-net#4)
- Fix parallelism timeline comment (60s not 10s) (sonic-net#5)
- Include after-relationship packages in fan stats (sonic-net#6)
- Guard disk I/O division by zero when INTERVAL<=1 (sonic-net#8)
- Remove unused elapsed_line variable (sonic-net#9)
- Remove redundant LIBSWSSCOMMON_DBG check (sonic-net#10)
- Remove active_make_jobs from CSV header comment (sonic-net#11)
- Wire up _RDEPENDS parsing to build reverse deps (sonic-net#12)
- Remove unnecessary 'if v' filter on rdeps JSON (sonic-net#13)
- Remove unused REPORT_FORMAT parameter (sonic-net#15)
- Add cycle detection to critical path algorithm (sonic-net#16)
- Add execute permission check for companion scripts (sonic-net#17)

Signed-off-by: Rustiqly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant