Files
eagle0/scripts/ai_perf_test.sh
T
54494c973b Performance test (#4275)
* missing dep

* cleanup

* Add AI Performance Runner implementation plan

Create comprehensive plan for automated AI performance testing tool that
replicates the manual "Perf" button testing from Unity client. The tool
will provide reproducible performance measurements without requiring
client interaction.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* slow progress

* getting there

* it runs

* it runs

* fully runs

* fully runs

* omg is it working

* removed a lot of loggin

* summary data

* Update AI performance runner to use CommandChoiceResults metrics

- Replace timing-based metrics with search depth and evaluation counts
- Use CommandChoiceResults returned by ShardokAIClient methods
- Display key performance metrics: depth achieved, commands evaluated vs available
- Calculate average search depth and evaluation rate across turns
- Show turn-by-turn breakdown with command types chosen
- Remove obsolete timing measurements in favor of AI budget-based metrics

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add evaluation rate by depth analysis

- Replace meaningless average evaluation rate with depth-specific rates
- Show evaluation percentage at each depth level achieved
- Account for turns that reached higher depths (100% assumed for lower depths)
- Display how many turns reached each depth level
- Provides meaningful insight into time budget utilization at each search level

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Force optimization for AI performance runner binary

- Add -O3 and -DNDEBUG flags to copts for ai_performance_runner binary
- Ensures the performance testing tool always runs optimized regardless of build mode
- Critical for accurate AI performance measurements

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

Co-Authored-By: Claude <noreply@anthropic.com>

* bad eval

* run gazelle

* Revert copts optimization and add ai_perf_test.sh script

- Revert BUILD.bazel copts changes (insufficient for global optimization)
- Add scripts/ai_perf_test.sh that runs with "bazel run -c opt"
- Script defaults to 10 turns and accepts additional arguments
- Global -c opt dramatically improves AI performance (depth 3 vs depth 2)
- Ensures all AI dependencies are optimized for accurate performance testing

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

Co-Authored-By: Claude <noreply@anthropic.com>

* review comments

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-16 16:20:49 -07:00

11 lines
396 B
Bash
Executable File

#!/bin/bash
set -e
# AI Performance Test Runner Script
# Runs the AI performance test with optimized builds and 10 turns
echo "Running AI performance test with optimized build..."
echo "=============================================="
# Run with optimized compilation and 10 turns
bazel run -c opt //src/main/cpp/net/eagle0/shardok/ai_performance_runner:ai_performance_runner -- --turns=10 "$@"