Skip to content

Metrics

Sevhena Walker edited this page Apr 4, 2025 · 3 revisions

Carbon Metrics and Reporting

Understanding the Metrics Panel

Carbon Metrics view is displayed on the sidebar with various details on each file.

The Carbon Metrics panel provides tangible evidence of your sustainability impact through several organizational levels:

  1. Workspace Summary:
    The root node shows total CO₂ savings across your entire configured workspace, along with a breakdown by smell type.

  2. Directory-Level Metrics:
    Each folder shows aggregated savings for all files within it, allowing you to identify which parts of your codebase are offering the most optimization potential.

  3. File-Specific Data:
    Individual files display their contribution to the overall savings, with detailed type-by-type breakdowns.

All values are shown in kilograms of CO₂ equivalent, calculated based on:

  • The computational complexity reduction from each refactoring
  • Standardized emissions factors for Python operations
  • Your local execution environment characteristics

Data Export Functionality

To support sustainability reporting and progress tracking, EcoOptimizers allows exporting your metrics data:

  1. Click the three-dot menu in the Carbon Metrics panel
  2. Select "Export Metrics Data as JSON"

The generated JSON file contains:

  • Timestamp of export
  • Workspace configuration details
  • Comprehensive metrics data (aggregate and per-file)
  • Refactoring history with timestamps

This feature enables:

  • Long-term tracking of your project's efficiency improvements
  • Incorporation of code sustainability metrics into project reporting
  • Sharing results with team members or stakeholders

Clone this wiki locally