From 375fdcc47e3b3e5c7d762018f271c2ea88f37692 Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 6 Aug 2025 01:55:03 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Checkpoint:=20Edit=20/workspaces?= =?UTF-8?q?/claude-code-flow/benchmark/tests/integration/test=5Fmle=5Fstar?= =?UTF-8?q?=5Fintegration=5Ffixed.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- benchmark/.claude/checkpoints/1754445247.json | 1 + benchmark/.claude/checkpoints/1754445249.json | 1 + .../__pycache__/hello_world.cpython-312.pyc | Bin 0 -> 710 bytes benchmark/hello_world.js | 12 ++++++ benchmark/hello_world.py | 21 ++++++++++ benchmark/test_hello_world.js | 39 ++++++++++++++++++ benchmark/test_hello_world.py | 33 +++++++++++++++ .../test_mle_star_integration_fixed.py | 21 ++++++++++ .../test_benchmark_engine.cpython-312.pyc | Bin 0 -> 7929 bytes 9 files changed, 128 insertions(+) create mode 100644 benchmark/.claude/checkpoints/1754445247.json create mode 100644 benchmark/.claude/checkpoints/1754445249.json create mode 100644 benchmark/__pycache__/hello_world.cpython-312.pyc create mode 100644 benchmark/hello_world.js create mode 100644 benchmark/hello_world.py create mode 100644 benchmark/test_hello_world.js create mode 100644 benchmark/test_hello_world.py create mode 100644 benchmark/tests/integration/test_mle_star_integration_fixed.py create mode 100644 benchmark/tests/unit/__pycache__/test_benchmark_engine.cpython-312.pyc diff --git a/benchmark/.claude/checkpoints/1754445247.json b/benchmark/.claude/checkpoints/1754445247.json new file mode 100644 index 0000000000..f080a3f475 --- /dev/null +++ b/benchmark/.claude/checkpoints/1754445247.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250806-015407", "file": "/workspaces/claude-code-flow/benchmark/GITHUB_ISSUE_599_UPDATE.md", "timestamp": "2025-08-06T01:54:07Z", "type": "pre-edit", "original_branch": "alpha-88"} diff --git a/benchmark/.claude/checkpoints/1754445249.json b/benchmark/.claude/checkpoints/1754445249.json new file mode 100644 index 0000000000..fd681877de --- /dev/null +++ b/benchmark/.claude/checkpoints/1754445249.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250806-015409", "file": "/workspaces/claude-code-flow/benchmark/GITHUB_ISSUE_599_UPDATE.md", "timestamp": "2025-08-06T01:54:09Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " .claude-flow/metrics/system-metrics.json | 204 +++++ benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/system-metrics.json | 14 + benchmark/.claude-flow/metrics/task-metrics.json | 6 +- benchmark/.claude/checkpoints/1754445190.json | 1 + benchmark/.claude/checkpoints/1754445191.json | 1 + benchmark/GITHUB_ISSUE_599_UPDATE.md | 166 ++++ benchmark/ci_performance_integration.py | 754 ----------------- benchmark/compare_optimizations.py | 172 ---- benchmark/continuous_performance_monitor.py | 673 --------------- benchmark/demo_comprehensive.py | 233 ----- benchmark/demo_mle_star.py | 152 ---- benchmark/demo_real_benchmark.py | 219 ----- benchmark/demo_reports/benchmark_summary.json | 89 -- ...-mesh_54f77f50-5c84-4bee-a929-207b1194ac7d.json | 129 --- ...-mesh_826e8b63-4f5e-4aea-bd83-04b4496cfc4e.json | 129 --- ...-mesh_bdb0f91c-4de0-4459-aacd-702df5b8dd3d.json | 129 --- ...lized_0ccd161d-5c63-4117-a8b2-59db5a9dda48.json | 131 --- ...lized_b7461443-088c-4cb3-a90d-5936cc4c9891.json | 131 --- ...lized_b7e1dad2-453d-4983-8f6f-14f7be7dc716.json | 131 --- ...hical_62f546df-f93c-468a-b4e7-cf665a791aaf.json | 131 --- ...hical_6611c450-c58b-4e9c-badd-7c5aaf89f4fd.json | 131 --- ...hical_e723cdc5-93b9-4480-b136-281f9990ef3e.json | 131 --- ...lized_14cf0a3f-11f8-4297-8250-619a7c57d8b2.json | 129 --- ...lized_8621aa31-c81a-437e-b5b0-5500ad975393.json | 129 --- ...lized_9afe8bb8-143d-429b-9da1-ed6722d18dd3.json | 129 --- ...ybrid_20e5e971-c1aa-411f-a4c1-bd9c831d468a.json | 129 --- ...ybrid_a563ac83-1474-4f2e-8628-cf38d363f4d2.json | 129 --- ...ybrid_e81f77c8-485f-449c-9160-4639ecff6741.json | 129 --- ...buted_02e44433-4487-4983-8cb5-dfd39be0e393.json | 129 --- ...buted_67cab5d5-e07c-48fb-94fc-8bfb59d8a030.json | 129 --- ...buted_7f0d6c07-159e-4956-bbfa-c80906c87c97.json | 129 --- ...buted_c88872a5-d0bd-4d5f-9bfd-39904d4000bd.json | 126 --- ...buted_c941e576-5936-4044-9133-f6aa6d292a3e.json | 126 --- ...buted_de30d0d7-afab-42bd-b244-5e1fc4e55adc.json | 126 --- benchmark/example_usage.py | 249 ------ .../__pycache__/benchmark_runner.cpython-312.pyc | Bin 24173 -> 0 bytes .../automated_test_runner.cpython-312.pyc | Bin 32696 -> 0 bytes .../__pycache__/parallel_executor.cpython-312.pyc | Bin 23676 -> 0 bytes .../__pycache__/result_collector.cpython-312.pyc | Bin 39201 -> 0 bytes benchmark/hive-mind-load-test.py | 902 -------------------- benchmark/hive-mind-stress-test.py | 935 --------------------- benchmark/mle_star_benchmark_example.py | 229 ----- .../optimization_comparison_20250614_200237.json | 52 -- benchmark/performance_dashboard.py | 769 ----------------- benchmark/quick_test_integration.py | 44 - benchmark/real_benchmark_results.json | 92 -- ...ized_0756a031-b873-43e1-9ea2-7ea25b5c092c.json} | 52 +- .../reports/examples/all_examples_results.json | 96 +-- benchmark/run-load-tests.py | 479 ----------- benchmark/run_performance_tests.py | 550 ------------ benchmark/simple-load-test.py | 322 ------- benchmark/simple_load_test_results.json | 123 --- benchmark/simple_test_results.json | 25 - .../__pycache__/__init__.cpython-312.pyc | Bin 2870 -> 2879 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 1345 -> 0 bytes .../__pycache__/memory_profiler.cpython-312.pyc | Bin 43459 -> 0 bytes .../__pycache__/metric_aggregator.cpython-312.pyc | Bin 42675 -> 0 bytes .../__pycache__/neural_benchmarks.cpython-312.pyc | Bin 44186 -> 0 bytes .../performance_analyzer.cpython-312.pyc | Bin 57821 -> 0 bytes .../__pycache__/token_optimizer.cpython-312.pyc | Bin 40053 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 1652 -> 0 bytes .../__pycache__/batch_processor.cpython-312.pyc | Bin 40756 -> 0 bytes .../__pycache__/decision_engine.cpython-312.pyc | Bin 44984 -> 0 bytes .../automation/__pycache__/models.cpython-312.pyc | Bin 2252 -> 0 bytes .../__pycache__/pipeline_manager.cpython-312.pyc | Bin 32505 -> 0 bytes .../__pycache__/resource_pool.cpython-312.pyc | Bin 38372 -> 0 bytes .../__pycache__/workflow_executor.cpython-312.pyc | Bin 43709 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 738 -> 0 bytes .../__pycache__/optimizer.cpython-312.pyc | Bin 27444 -> 0 bytes .../__pycache__/rules_engine.cpython-312.pyc | Bin 20977 -> 0 bytes .../__pycache__/templates.cpython-312.pyc | Bin 21167 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 2698 -> 0 bytes .../config/__pycache__/__init__.cpython-312.pyc | Bin 524 -> 533 bytes .../__pycache__/unified_config.cpython-312.pyc | Bin 27458 -> 27467 bytes .../core/__pycache__/__init__.cpython-312.pyc | Bin 1415 -> 1424 bytes .../__pycache__/base_interfaces.cpython-312.pyc | Bin 20843 -> 20852 bytes .../__pycache__/benchmark_engine.cpython-312.pyc | Bin 7620 -> 7629 bytes .../__pycache__/integration_utils.cpython-312.pyc | Bin 0 -> 27539 bytes .../core/__pycache__/models.cpython-312.pyc | Bin 18629 -> 18638 bytes .../optimized_benchmark_engine.cpython-312.pyc | Bin 15770 -> 15779 bytes .../orchestration_manager.cpython-312.pyc | Bin 25940 -> 25949 bytes .../__pycache__/parallel_executor.cpython-312.pyc | Bin 35716 -> 35725 bytes .../__pycache__/result_aggregator.cpython-312.pyc | Bin 1029 -> 1038 bytes .../__pycache__/task_scheduler.cpython-312.pyc | Bin 22516 -> 22525 bytes .../mle_star/__pycache__/__init__.cpython-312.pyc | Bin 1091 -> 0 bytes .../__pycache__/ensemble_executor.cpython-312.pyc | Bin 24374 -> 0 bytes .../__pycache__/ml_scenarios.cpython-312.pyc | Bin 28015 -> 0 bytes .../__pycache__/model_coordinator.cpython-312.pyc | Bin 38329 -> 0 bytes .../performance_tracker.cpython-312.pyc | Bin 31006 -> 0 bytes .../__pycache__/voting_strategies.cpython-312.pyc | Bin 31206 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 2003 -> 2012 bytes .../__pycache__/analysis_strategy.cpython-312.pyc | Bin 3220 -> 3229 bytes .../__pycache__/auto_strategy.cpython-312.pyc | Bin 5525 -> 5534 bytes .../__pycache__/base_strategy.cpython-312.pyc | Bin 2972 -> 2981 bytes .../development_strategy.cpython-312.pyc | Bin 6692 -> 6701 bytes .../maintenance_strategy.cpython-312.pyc | Bin 3239 -> 3248 bytes .../optimization_strategy.cpython-312.pyc | Bin 3290 -> 3299 bytes .../__pycache__/research_strategy.cpython-312.pyc | Bin 6215 -> 6224 bytes .../__pycache__/testing_strategy.cpython-312.pyc | Bin 3181 -> 3190 bytes benchmark/swarm_performance_suite.py | 840 ------------------ benchmark/test_claude_optimizer.py | 235 ------ benchmark/test_integration.py | 274 ------ benchmark/test_mle_star_integration.py | 225 ----- ... Test_709dc013-50f2-4810-bd2f-e3b3073f8ae6.json | 131 --- ... Test_8f21a1f2-bd66-420d-ad63-97c7c964582a.json | 131 --- benchmark/test_real_benchmark_engine.py | 317 ------- benchmark/test_real_claude_flow.py | 218 ----- benchmark/test_real_metrics.py | 128 --- benchmark/test_real_simple.py | 104 --- benchmark/test_simple_run.py | 35 - .../tests/.claude-flow/metrics/performance.json | 2 +- .../tests/.claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 114 files changed, 468 insertions(+), 12495 deletions(-) "} diff --git a/benchmark/__pycache__/hello_world.cpython-312.pyc b/benchmark/__pycache__/hello_world.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16fd5131bb4c4c02cd0d3b5fde828d82666fce2e GIT binary patch literal 710 zcmaJ;y^GX96n~RUc5^xJ;7~zj#kp!Pc;{9&iwJU{Rw|w#972eh*-hAdF-bUfv9PdE zY!({@u@sc6{R3>ZIs7P0>pzfVyRCdP?&4KGnBV)F_j~Wnd|g{}0Oj+iSK$`|@LM@c zu@=Vc5gM<7!#?mfCxUQ8kOAf9Gi%=vCa0q<0NF7>P&~%rqU;d)ln_{ExV4NeHGy$! z+;Z(n*V&7bJQnP>h~tbs%w){jph|->%2F1k?B2Kxv(%|+>L;RZNl{iZ4HhkQ9}`iX z**XG_OP;`6;Kn<14_tHd-eD;JX`=HQZpdNL*On?#{n%DfO1IDM=4u>2{u|7FiMdk9 zZN|mGui~;`WyZRC`0hWx`+C+Blt|WRx1+SPsTxTLo9TCP>MJ&$JrCQaN! zGpYjhOc=9r8KtFcA&p#7&_ str: + """ + Simple Hello World function + + Args: + name (str): Optional name parameter, defaults to 'World' + + Returns: + str: Greeting message + """ + return f"Hello, {name}!" + + +# Example usage +if __name__ == "__main__": + print(hello_world()) # Output: Hello, World! + print(hello_world("Claude")) # Output: Hello, Claude! \ No newline at end of file diff --git a/benchmark/test_hello_world.js b/benchmark/test_hello_world.js new file mode 100644 index 0000000000..574d2d1d2f --- /dev/null +++ b/benchmark/test_hello_world.js @@ -0,0 +1,39 @@ +/** + * Unit tests for Hello World function + */ + +import { helloWorld } from './hello_world.js'; + +// Simple test framework +function test(description, testFunc) { + try { + testFunc(); + console.log(`✓ ${description}`); + } catch (error) { + console.log(`✗ ${description}`); + console.error(` Error: ${error.message}`); + } +} + +function assert(condition, message) { + if (!condition) { + throw new Error(message || 'Assertion failed'); + } +} + +// Run tests +console.log('Running JavaScript Hello World Tests:\n'); + +test('should return "Hello, World!" with no parameter', () => { + assert(helloWorld() === 'Hello, World!', 'Default parameter not working'); +}); + +test('should return custom greeting with name parameter', () => { + assert(helloWorld('Claude') === 'Hello, Claude!', 'Custom name not working'); +}); + +test('should handle empty string', () => { + assert(helloWorld('') === 'Hello, !', 'Empty string not handled'); +}); + +console.log('\nAll tests completed!'); \ No newline at end of file diff --git a/benchmark/test_hello_world.py b/benchmark/test_hello_world.py new file mode 100644 index 0000000000..ad02be6a42 --- /dev/null +++ b/benchmark/test_hello_world.py @@ -0,0 +1,33 @@ +""" +Unit tests for Hello World function +""" + +from hello_world import hello_world + + +def test_hello_world_default(): + """Test default parameter""" + assert hello_world() == "Hello, World!" + print("✓ Default parameter test passed") + + +def test_hello_world_custom_name(): + """Test with custom name""" + assert hello_world("Claude") == "Hello, Claude!" + print("✓ Custom name test passed") + + +def test_hello_world_empty_string(): + """Test with empty string""" + assert hello_world("") == "Hello, !" + print("✓ Empty string test passed") + + +if __name__ == "__main__": + print("Running Python Hello World Tests:\n") + + test_hello_world_default() + test_hello_world_custom_name() + test_hello_world_empty_string() + + print("\nAll tests completed!") \ No newline at end of file diff --git a/benchmark/tests/integration/test_mle_star_integration_fixed.py b/benchmark/tests/integration/test_mle_star_integration_fixed.py new file mode 100644 index 0000000000..abfceb9f05 --- /dev/null +++ b/benchmark/tests/integration/test_mle_star_integration_fixed.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +""" +Test script for MLE-STAR ensemble integration. + +This script tests the basic functionality of the MLE-STAR implementation +including ensemble execution, voting strategies, and performance tracking. +""" + +import asyncio +import logging +import sys +import os +from pathlib import Path + +# Add the src directory to Python path +sys.path.insert(0, str(Path(__file__).parent.parent.parent / "src")) + +from swarm_benchmark.mle_star import ( + MLEStarEnsembleExecutor, MLEStarConfig, + MLScenarios, ClassificationScenario, RegressionScenario +) \ No newline at end of file diff --git a/benchmark/tests/unit/__pycache__/test_benchmark_engine.cpython-312.pyc b/benchmark/tests/unit/__pycache__/test_benchmark_engine.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b1aa5f24bc2e5d86fa8f4cc3646f42a9cced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