Spaces:
Running
Running
Profiling System Changelog
2025-09-29 - Major Reorganization
Added
- β
Organized all profiling-related files into
system_tests/profiling/directory - β YAML configuration support using Dynaconf
- β Retry mechanism with exponential backoff for Langfuse data fetching
- β
Main entry point script:
run_experiment.sh - β
HTTP server script:
serve.shfor viewing results - β Interactive charts and visualizations in comparison HTML
- β Environment variable configuration per experiment run
- β Provider comparison support (OpenAI vs Azure vs WatsonX)
- β Comprehensive documentation with examples
Interactive Visualizations
- π Bar charts for execution time, cost, tokens, and LLM calls
- π Variability chart showing Min/Avg/Max execution times with:
- Range calculation (Max - Min)
- Standard deviation for statistical analysis
- Coefficient of variation (CV%) for relative consistency
- β‘ Stacked bar chart for time breakdown
- π Radar chart for normalized performance comparison
- π¨ Color-coded modes with modern UI design
- π Tab navigation between charts and detailed tables
Structure
system_tests/profiling/
βββ run_experiment.sh # Main entry point for users
βββ bin/ # Internal scripts
β βββ profile_digital_sales_tasks.py
β βββ run_profiling.sh
β βββ run_experiment.sh
βββ config/ # YAML configurations
β βββ default_experiment.yaml
β βββ fast_vs_accurate.yaml
β βββ .secrets.yaml
βββ experiments/ # Experiment results
β βββ comparison.html
βββ reports/ # Individual profiling reports
Configuration Features
- YAML-based configuration with Dynaconf integration
- CLI arguments override config file settings
- Environment variable support for credentials
- Flexible experiment definitions with multiple runs
- Configurable retry settings for Langfuse data fetching
Retry Mechanism
- Exponential backoff: Starting at 2s, multiplying by 1.5x each attempt
- Smart detection: Checks for 404 errors and incomplete observations
- Configurable: Set
max_attemptsandinitial_delayin YAML - Default: 10 attempts over ~60 seconds total wait time
Migration from Old Structure
Old files moved/removed:
profile_digital_sales_tasks.pyβsystem_tests/profiling/bin/run_profiling.shβsystem_tests/profiling/bin/run_experiment.shβsystem_tests/profiling/bin/(rewritten)update_html.pyβ removed (HTML loads JSON dynamically)PROFILING_README.mdβsystem_tests/profiling/README.mdexperiments/βsystem_tests/profiling/experiments/profiling_report_*.jsonβsystem_tests/profiling/reports/
Usage
# Run experiment with config file
./system_tests/profiling/run_experiment.sh
# With specific config
./system_tests/profiling/run_experiment.sh --config fast_vs_accurate.yaml
# View results in browser
./system_tests/profiling/serve.sh --open
# Serve on different port
./system_tests/profiling/serve.sh --port 3000
Breaking Changes
- Old scripts at project root no longer work
- Use
./system_tests/profiling/run_experiment.shinstead - Configuration now uses YAML instead of CLI-only
Benefits
- π Better organization - all profiling files in one place
- βοΈ Easier configuration - YAML files instead of long CLI commands
- π More reliable - retry mechanism for Langfuse data
- π Automatic HTML generation - no need to run update script
- π― Clear entry point - single script for users