Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
Documentation Validation / validate-policies-strict (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Python Tests / test-python (push) Failing after 1m34s
Added stub data returns and error handling across multiple CLI handlers to prevent training script failures when services are unavailable: - AI handlers: Return stub job data instead of sys.exit on errors, fix coordinator_url parameter handling, wrap task_data in proper structure for job submission - Agent SDK: Add complete stub implementation for create/register/list/status/capabilities - System handlers: Add graceful fall
25 lines
1.4 KiB
Python
25 lines
1.4 KiB
Python
"""Performance command registration for the unified CLI."""
|
|
|
|
import argparse
|
|
|
|
from parser_context import ParserContext
|
|
|
|
|
|
def register(subparsers: argparse._SubParsersAction, ctx: ParserContext) -> None:
|
|
performance_parser = subparsers.add_parser("performance", help="Performance optimization and monitoring")
|
|
performance_parser.set_defaults(handler=lambda parsed, parser=performance_parser: parser.print_help())
|
|
performance_subparsers = performance_parser.add_subparsers(dest="performance_action")
|
|
|
|
performance_benchmark_parser = performance_subparsers.add_parser("benchmark", help="Run performance benchmark")
|
|
performance_benchmark_parser.add_argument("--target")
|
|
performance_benchmark_parser.set_defaults(handler=ctx.handle_performance_benchmark)
|
|
|
|
performance_optimize_parser = performance_subparsers.add_parser("optimize", help="Optimize performance")
|
|
performance_optimize_parser.add_argument("--target", default="general")
|
|
performance_optimize_parser.set_defaults(handler=ctx.handle_performance_optimize)
|
|
|
|
performance_tune_parser = performance_subparsers.add_parser("tune", help="Tune system parameters")
|
|
performance_tune_parser.add_argument("--aggressive", action="store_true")
|
|
performance_tune_parser.add_argument("--parameters", action="store_true")
|
|
performance_tune_parser.set_defaults(handler=ctx.handle_performance_tune)
|