feat: Add VM statistics and fix compilation errors for plugin tests

- Add VM instruction statistics (--vm-stats, --vm-stats-json)
- Fix missing fields in ast.rs test code (public_fields, private_fields)
- Add CliConfig fields for VM statistics
- Enable TLV debug logging in plugin_loader_v2
- Successfully test FileBox handle passing and HTTP plugin creation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm
2025-08-23 04:51:24 +09:00
parent dd09e81018
commit 63749b683e
12 changed files with 360 additions and 7 deletions

View File

@ -238,6 +238,20 @@ print("(3 * 4) + (20 / 4) = " + complex1)
calc.showHistory()
```
## 📊 VM性能計測オプション
VMバックエンドの命令統計を有効化すると、性能分析に役立つ集計が得られます。
```bash
# 人間向け表示
nyash --backend vm --vm-stats hello.nyash
# JSON出力ツール連携向け
nyash --backend vm --vm-stats --vm-stats-json hello.nyash
```
環境変数での制御も可能です(`NYASH_VM_STATS`, `NYASH_VM_STATS_JSON`)。
## ⚡ 並行処理の実践
```nyash
@ -544,4 +558,4 @@ loop(i < 1000) {
---
*Getting Started Guide v1.0*
*Everything is Box - Start Simple, Think Big*
*Everything is Box - Start Simple, Think Big*