EcoLogic
Code analysis, candidate refactors and runtime profiling with estimated energy and carbon comparisons.
2026Measured runtime and modeled energy in separate report fields.
Code candidates and resource comparison
EcoLogic explores software-energy analysis through two related implementations: a Python/Streamlit optimizer and a React/TypeScript/D3 dashboard with FastAPI analysis services. The optimizer compares candidate refactors and reports measured runtime alongside modeled energy/carbon values. The dashboard emphasizes code-analysis views and telemetry presentation.
Both repositories remain discoverable under one canonical project identity, with their distinct analysis/presentation paths explicit.
Code to comparison
- Source / workspace
- Candidate refactors
- Predict & profile
- Compare candidates
- Report
Code analysis, runtime evidence and energy-model output remain identifiable stages of the workflow.
What the project does
- Accept source text or workspace input such as a folder, ZIP or repository for analysis.
- Generate candidate changes through built-in heuristics and an optional assistant workflow.
- Score candidates through energy/runtime models and run measured profiling where the supported environment allows it.
- Present candidate rounds, Pareto comparisons, code context and downloadable reports.
Engineering decisions
Static analysis extracts source structure and features for candidate comparison. The FastAPI implementation includes AST analysis, with Tree-sitter/GraphSAGE-oriented work in the available code. Supported profiling runs supply timing information; feature-based models estimate resource impact.
Candidate ranking and Pareto views expose tradeoffs across dimensions. Original/refactored code can be compared through runtime and modeled estimates, which remain separately labeled. Streamlit reports and optional PDF export preserve a generated result report. React/D3 provides another interactive view of analysis data. The report is an output artifact, while the measured/model-derived fields communicate how each comparison was produced.