01
Comparison Engine
CORE ENGINE
A Python-based tool that measures and compares the energy consumption of two different versions of a project, quantifying environmental impact and code efficiency deltas.
Engine Showcase • v1.0.0
02
Automated Profiling & Advisory Engine
ADVISORY ENGINE
1. Project Overview: 8DoTs Automated Web Energy Profiler
8DoTs is a specialized development tool designed to measure the real-world energy consumption of web applications. Unlike traditional performance tools that estimate power usage based on CPU load or network traffic, 8DoTs reads data directly from hardware sensors to provide precise, actionable insights into how every click, animation, and script impacts energy efficiency.
Core Capabilities
Key Features
01 / SENSORS
Hardware-Accurate Measurement
Utilizes Intelβs RAPL (Running Average Power Limit) interface to read actual energy draw in microjoules, ensuring zero estimation error.
02 / EXPLORER
Intelligent Auto-Explorer
Automatically navigates your website using a headless browser, discovering and interacting with buttons, tabs, and links to simulate real user behavior.
03 / TRACKING
Event-Driven Tracking
Correlates specific UI eventsβsuch as page loads, API fetches, and clicksβwith spikes in energy consumption.
04 / SCAN
Deep Page Analysis
Scans the DOM to identify energy-intensive elements, including large uncompressed images, excessive CSS animations, third-party scripts, and autoplay videos.
05 / ADVISOR
Actionable Recommendations
Provides an "Energy Advisor" that doesn't just report problems but offers specific fixes, such as converting images to WebP, deferring scripts, or reducing DOM complexity.
06 / REPORTING
Multi-Format Reporting
Generates detailed reports in color-coded terminal output, clean TXT/Markdown files, and professional PDFs for stakeholder review.
Kernel Subsystem
2. Core Engine: DoL8 RAPL Reader
At the heart of 8DoTs is the DoL8 library, a lightweight, zero-overhead Python engine built to interface directly with Linux power management systems.
Architecture
How It Works
SYSFS / INTERFACE
Direct Sysfs Access
DoL8 reads from /sys/class/powercap, bypassing high-level software estimations to get raw data from the CPU and memory controllers.
OPTIMIZATION / PERF
Zero-Overhead Design
To ensure the measurement process itself doesnβt consume significant power, DoL8 keeps file handles open and uses seek(0) for repeated reads, avoiding the overhead of constant file opening and closing.
DOMAINS
Domain Discovery
It automatically identifies available power domains, including:
PACKAGE
Total energy for the CPU package.
CORE
Energy consumed by individual CPU cores.
DRAM
Energy used by system memory.
UNCORE
Energy for cache and memory controllers.
OVERFLOW PROTECTION
Counter Wrap-Around Handling
RAPL counters are finite and reset when they reach their maximum value. DoL8 includes logic to detect these "wrap-arounds" and calculate the true total energy by adding the remaining range to the new reading.
Prerequisites
Technical Requirements
π§
Platform
Linux-only (requires access to the powercap subsystem).
β‘
Hardware
Intel processors (Sandy Bridge architecture or newer).
π
Permissions
Requires read access to powercap files, which can be configured permanently via udev rules to avoid needing root privileges for every run.
DOM & Resource Auditing
3. The Intelligent Energy Advisor
8DoTs goes beyond simple metrics by providing an Intelligent Energy Advisor that analyzes the structural components of your web pages.
Analysis Metrics
Analysis Metrics
IMAGES
Image Efficiency
Detects large-resolution images and uncompressed formats (PNG/BMP) that waste bandwidth and rendering energy.
ANIMATIONS
Animation Load
Counts active CSS animations and transitions, which keep the GPU and CPU busy even when the user isn't interacting.
DOM
DOM Complexity
Measures the total number of DOM elements, as larger trees require more processing power to render and update.
SCRIPTS
Third-Party Impact
Identifies external scripts and iframes that may be loading heavy resources from other servers.
Recommendations
Sample Recommendations
π‘
"Found 3 large images. Use responsive srcset or lazy loading to reduce initial load energy."
π‘
"Detected 5 third-party scripts. Defer non-critical ones to improve main-thread efficiency."
π‘
"1500+ DOM elements detected. Simplify HTML structure to reduce rendering cost."
Workflows
4. Integration & Reporting
-
CI/CD Pipeline: Can be integrated into Linux-based CI/CD pipelines to benchmark the energy impact of every pull request.
-
Docker Support: Runs in privileged Linux containers with access to host powercap interfaces.
-
Cost Estimation: Converts energy usage into estimated cloud costs (based on $0.15/kWh).
-
Carbon Footprint: Calculates estimated CO2 emissions (based on 450g CO2/kWh) to help meet sustainability goals.
-
Professional Exports: Generates clean, color-stripped TXT and Markdown files for documentation, and formatted PDFs for presentations.
Sustainability
5. Why Use 8DoTs?
In an era where digital sustainability is becoming a key metric, 8DoTs provides the transparency needed to build efficient, eco-friendly web applications. By moving from estimation to hardware-level measurement, it empowers developers to make data-driven decisions that reduce both operational costs and environmental impact.
Engine Showcase • v0.1.0
03
Precision Linux Energy Profiler
LINUX PROFILER
DoL8: High-Resolution Energy Profiler for Linux
Overview
Precision Bare-Metal Profiling
DoL8 (v0.1.0) is a precision energy profiling toolkit designed for Linux bare-metal environments. It provides high-resolution estimates of program energy consumption by leveraging Intel RAPL (Running Average Power Limit) counters via the powercap sysfs interface. Unlike generic power meters, DoL8 isolates workload-specific energy use through baseline subtraction, thermal-aware cooldowns, and rigorous process tree management.
Core Capabilities
Key Features
Nine specialized capabilities built for laboratory-grade energy measurement and attribution.
01 / HARDWARE
Hardware-Accurate Measurement
Reads RAPL energy counters directly from /sys/class/powercap for CPU/package-level energy tracking.
02 / BASELINE
Baseline Subtraction
Automatically measures idle system power before each run and subtracts it to report net workload energy.
03 / THERMAL
Thermal Awareness
Monitors CPU temperature and enforces cooldown periods between runs to prevent thermal throttling from skewing benchmarks.
04 / PROCESSES
Robust Process Management
Uses POSIX process groups and Linux child-subreaper (prctl) to ensure all spawned child processes are terminated and accounted for. Warns explicitly if survivor processes exist.
05 / STATISTICS
Statistical Rigor
Supports configurable warmup runs, multiple measured iterations, and reports mean, standard deviation, and coefficient of variation.
06 / CI/CD
Energy Gate / CI Integration
Save baselines and enforce energy budgets in CI pipelines with configurable percentage thresholds.
07 / COMPARISON
Multi-Target Comparison
A/B test two scripts or executables with alternating measurements and automatic delta reporting.
08 / OBSERVABILITY
Observability Mode
watch command provides real-time machine energy monitoring with estimated application share attribution.
09 / DIAGNOSTICS
Environment Diagnostics
Built-in doctor command validates RAPL access, counter movement, sensor availability, timing sources, and output permissions.
π§
OS: Linux bare metal only
Requires kernel powercap RAPL interface support.
β‘
Hardware: Intel CPUs
Processors equipped with RAPL-enabled firmware registers.
π
Python: 3.8+
Compatible with modern Python 3 environments.
CLI Reference
Command Reference
Direct terminal operations provided by the DoL8 toolkit.
| Command |
Description |
dol8 run <scripts> |
Profile one or more targets sequentially with baseline, warmup, and measured runs |
dol8 compare <a> <b> |
A/B compare two targets with alternating measurements |
dol8 watch [--attach PID] |
Observe live machine energy; optionally estimate a specific process's share |
dol8 boot-energy |
Estimate total energy consumed since system boot |
dol8 doctor |
Validate measurement environment readiness |
dol8 gate save <result.json> |
Save a profiling result as a reusable energy baseline |
Parameters
Common Flags (run / compare)
--runs N β Number of measured iterations (default: 1 for run, 5 for compare)
--warmup N β Discarded warmup runs before measurement (default: 1)
--timeout SEC β Per-run timeout in seconds (default: 600)
--json PATH β Export structured JSON results
--csv PATH β Export timeline data as CSV
--price KWH β Estimate monetary cost per run
--grid-factor G β Estimate COβ impact using SCI-aligned grid intensity
--gate-baseline FILE β Evaluate against a saved energy gate
--threshold PCT β Gate failure threshold percentage (default: 15%)
Module Layout
Architecture
Modular Python architecture enforcing explicit responsibility boundaries.
dol8/
βββ __init__.py # Public API: exports PowerProfiler
βββ cli.py # Argument parsing, command dispatch, orchestration
βββ runner.py # TargetRunner (process mgmt) + PowerProfiler (context manager)
βββ rapl.py # RAPL sysfs reader, counter wrap handling, domain parsing
βββ poller.py # Background sampling thread for timeline & throttle detection
βββ thermal.py # Temperature sensor, battery status, psutil integration
βββ stats.py # Baseline measurement, subtraction, aggregation, confidence
βββ report.py # Terminal rendering, JSON/CSV export formatters
βββ compare.py # A/B comparison logic and scan summaries
βββ gate.py # Energy baseline persistence and threshold evaluation
βββ doctor.py # Environment diagnostics (RAPL, sensors, timing, permissions)
βββ watch.py # Live observation mode with process attribution
Execution Pipeline
Core Workflow (dol8 run)
Six automated stages guaranteeing isolated, reproducible measurements.
-
01
Baseline
Measure idle system power for 5 seconds.
-
02
Warmup
Execute target N times (results discarded).
-
03
Cooldown
Wait up to 60s for CPU temp to return within 5Β°C of baseline.
-
04
Measured Runs
Execute target inside PowerProfiler context, capturing RAPL deltas, thermal stats, GPU data, and timeline samples.
-
05
Aggregate
Subtract baseline, compute statistics across runs.
-
06
Report
Render terminal output and/or export JSON/CSV.
Process Standards
Exit Codes
| Code |
Meaning |
0 |
All targets completed successfully |
1 |
Environment error, invalid arguments, or all targets failed |
2 |
One or more targets failed but at least one succeeded |
130 |
Interrupted by user (Ctrl+C); partial results retained where available |
Configuration
Environment Setup
Ensure RAPL counters are readable and test readiness.
ls /sys/class/powercap/intel-rapl*/energy_uj
sudo chmod -R a+r /sys/class/powercap/intel-rapl*/
dol8 doctor --output-dir ./results
CLI
Terminal
Human-readable summary with energy, power, thermal, and statistical breakdown.
DATA
JSON
Full structured results including per-domain energy, timeline samples, throttle events, GPU metrics, and battery state.
TIMELINE
CSV
Time-series timeline data for external visualization.
Honest Attribution Note
When using dol8 watch, application energy share is estimated based on CPU-time proportionality. This is an approximation β only dol8 run provides direct RAPL-measured workload isolation through baseline subtraction.