agentsclimarketplace

Benchmark

Skill solitasroh/rkit/skills/benchmark

MCU/MPU/WPF domain-specific build and resource benchmarking. MCU: Flash/RAM usage via arm-none-eabi-size. MPU: rootfs/image size. WPF: build time and publish size. Triggers: benchmark, 벤치마크, ベンチマーク, 基准测试, benchmarking, Benchmark, riferimentoFrom its SKILL.md

Install
npx -y skills add solitasroh/rkit --skill benchmark

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.6 KB, as published. Nobody here has run it

<!-- BEGIN: cycle3-body-neutral -->

0. 문서 구조 (본 SKILL의 세 층)

  1. 도메인 본문 (§1 ~ §N): 이 SKILL의 프로토콜. 잠금 어휘 사용 0건이 verify-policy --check body-neutrality로 자동 검증됩니다.
  2. 방법론 본문 — 도메인 중립: Cycle 3에서 <!-- BEGIN: cycle3-body-neutral --> ~ <!-- END: cycle3-body-neutral --> 마커로 감싸진 영역.
  3. 도메인 예시 부록 (§A): MCU/MPU/WPF 도메인별 사례. SoT(policies/locked-vocab.json)에서 scripts/gen-locked-vocab.mjs가 자동 생성합니다.

직접 부록을 편집하지 마세요 — node scripts/gen-locked-vocab.mjs로 재생성됩니다.


Build & Resource Benchmark

1. Domain Auto-Detection

Before running any benchmark, detect the project domain:

  1. MCU: Look for .ioc, .ld, startup_*.s, stm32*.h, fsl_*.h files
  2. MPU: Look for .dts, .dtsi, bblayers.conf, *.bb files
  3. WPF: Look for .csproj with <UseWPF>true</UseWPF>

If detection fails, ask the user: "Could not auto-detect project domain. Which domain is this project? (MCU / MPU / WPF)"

2. MCU Benchmark Protocol

2.1 Flash/RAM Usage Measurement

# Find all ELF files
find build/ -name "*.elf" 2>/dev/null

# Measure Flash/RAM usage
arm-none-eabi-size --format=berkeley <project>.elf

Parse output columns:

  • text + data = Flash usage
  • data + bss = RAM usage

2.2 Linker Script Capacity Parsing

Parse the .ld linker script for total capacity:

MEMORY
{
  FLASH (rx)  : ORIGIN = 0x08000000, LENGTH = 512K
  RAM (xrw)   : ORIGIN = 0x20000000, LENGTH = 128K
}

Extract ORIGIN and LENGTH for FLASH and RAM regions.

2.3 Threshold Evaluation

ResourceWarningCritical
Flash> 85%> 95%
RAM> 75%> 90%

2.4 Delta Comparison

Load previous benchmark from .rkit/state/benchmark-history.json:

{
  "benchmarks": [
    {
      "timestamp": "2026-04-01T10:00:00Z",
      "domain": "mcu",
      "platform": "stm32",
      "elf": "build/firmware.elf",
      "flash_used": 102400,
      "flash_total": 524288,
      "ram_used": 32768,
      "ram_total": 131072,
      "commit": "abc1234"
    }
  ]
}

Calculate delta from last entry:

  • delta_flash = current - previous (bytes and %)
  • delta_ram = current - previous (bytes and %)

2.5 MCU Benchmark Commands

# Full benchmark
arm-none-eabi-size --format=sysv build/*.elf    # Per-section detail
arm-none-eabi-size --format=berkeley build/*.elf # Summary

# Per-object breakdown (what grew?)
arm-none-eabi-nm --size-sort --print-size build/*.elf | tail -20

3. MPU Benchmark Protocol

3.1 Image Size Measurement

# Yocto deploy directory
ls -lh tmp/deploy/images/<MACHINE>/

# Image size
du -sh tmp/deploy/images/<MACHINE>/*.rootfs.ext4
du -sh tmp/deploy/images/<MACHINE>/*.rootfs.tar.gz

# rootfs breakdown
du -sh tmp/work/<MACHINE>-poky-linux-gnueabi/*/image/ 2>/dev/null | sort -rh | head -20

3.2 Build Time

# Parse bitbake log for total build time
grep "^Build completed" tmp/log/cooker/<MACHINE>/console-latest.log

# Per-recipe build time (top 10 slowest)
grep "^NOTE: recipe" tmp/log/cooker/<MACHINE>/console-latest.log | sort -t= -k2 -rn | head -10

3.3 Package Count

# Total packages in image
cat tmp/deploy/images/<MACHINE>/*.manifest | wc -l

3.4 MPU Thresholds

MetricGuideline
rootfs (NAND)< 90% of NAND partition size
rootfs (SD)< 80% of SD partition size
Boot timeProject-specific target

4. WPF Benchmark Protocol

4.1 Build Time Measurement

# Clean build time
dotnet clean -c Release 2>/dev/null
time dotnet build -c Release

# Publish size
dotnet publish -c Release -o publish_output/
du -sh publish_output/

4.2 Publish Artifact Breakdown

# Largest files in publish output
du -a publish_output/ | sort -rn | head -20

# DLL count and total size
find publish_output/ -name "*.dll" | wc -l
find publish_output/ -name "*.dll" -exec du -ch {} + | tail -1

4.3 NuGet Package Audit

# List all packages
dotnet list package

# Package count
dotnet list package --format json 2>/dev/null | jq '.projects[].frameworks[].topLevelPackages | length'

4.4 WPF Thresholds

MetricWarningCritical
Build time> 60s> 180s
Publish size> 100MB> 300MB
NuGet packages> 30> 50

5. Output Format

Present results in a structured table:

## Benchmark Results — {domain} ({platform})
Date: {timestamp}
Commit: {short_hash}

| Metric         | Value       | Delta     | Threshold | Status |
|----------------|-------------|-----------|-----------|--------|
| Flash Used     | 98.5 KB     | +1.2 KB   | < 85%     | OK     |
| Flash %        | 19.2%       | +0.2%     | < 85%     | OK     |
| RAM Used       | 24.3 KB     | -0.1 KB   | < 75%     | OK     |
| RAM %          | 19.0%       | -0.1%     | < 75%     | OK     |

Status values:

  • OK: Within threshold
  • WARN: Exceeds warning threshold
  • CRIT: Exceeds critical threshold

6. History and Trend Analysis

After each benchmark run:

  1. Save results to .rkit/state/benchmark-history.json
  2. Trend: Compare last 5 entries, report if usage is trending upward
  3. Alert: If 3 consecutive benchmarks show increasing usage, warn about resource pressure
  4. Largest growth: Identify the commit/change that caused the biggest delta
{
  "trend": {
    "direction": "increasing",
    "avg_delta_flash_pct": "+0.3%",
    "avg_delta_ram_pct": "+0.1%",
    "consecutive_increases": 3,
    "alert": "Flash usage trending upward for 3 consecutive builds"
  }
}

7. Integration

  • Runs after /pdca do builds or on-demand via benchmark trigger
  • Results can be included in /pdca report via benchmark summary section
  • Supports CI integration: exit code 1 if any metric is CRIT
<!-- END: cycle3-body-neutral -->

Keep looking

Skills are one crate of 609,856. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.