Skip to main content

AI-Powered Load Test Analysis & Root Cause Explanation

Project description

 █████   █████           ███                           
░░███   ░░███           ░░░                            
 ░███    ░███   ██████  ████  █████████████   ████████ 
 ░███████████  ███░░███░░███ ░░███░░███░░███ ░░███░░███
 ░███░░░░░███ ░███████  ░███  ░███ ░███ ░███  ░███ ░░░ 
 ░███    ░███ ░███░░░   ░███  ░███ ░███ ░███  ░███     
 █████   █████░░██████  █████ █████░███ █████ █████    
░░░░░   ░░░░░  ░░░░░░  ░░░░░ ░░░░░ ░░░ ░░░░░ ░░░░░     

Heimr.ai

AI-Powered Load Test Analysis & Root Cause Explanation

Stop staring at charts. Let AI explain what went wrong and how to fix it.


Why Heimr?

🎯 Explainable by Design

Unlike black-box ML tools, Heimr shows you exactly why something was flagged:

  • "P99 latency is 3.2x higher than P50 (bimodal distribution detected)"

  • "Memory usage increased 950% during test execution"

  • "Cache hit rate dropped to 12%, causing database saturation"

No guessing. No magic. Just clear, actionable insights.

🔍 Multi-Signal Intelligence

Heimr doesn't just look at latency. It correlates:

  • ✅ Load test anomalies (spikes, bimodal patterns, gradual degradation)

  • ✅ Infrastructure metrics (CPU, memory, disk I/O)

  • ✅ Application logs (errors, warnings, GC pauses)

  • ✅ Distributed traces (slow spans, service dependencies)

  • ✅ Error rates and response codes

140+ failure scenarios built-in, from cache stampedes to memory leaks.

🤖 LLM-Powered Root Cause Analysis

After detecting issues, Heimr uses Large Language Models to:

  • Explain the root cause in plain English

  • Suggest specific remediation steps

  • Correlate patterns across multiple signals

  • Generate executive summaries for stakeholders

Privacy-first: Run completely local with Llama 3.1 (no data leaves your infrastructure).

⚡ Works with Your Stack

Seamless integration with industry-standard tools:

  • Load Testing: JMeter, k6, Gatling, Locust

  • Metrics: Prometheus, Grafana

  • Logs: Loki, Elasticsearch

  • Traces: Tempo, Jaeger

No vendor lock-in. Use what you already have.


📚 Documentation

→ Full Documentation — Quick Start, CLI Reference, Configuration, AI Engine, Python API, CI/CD, Troubleshooting, and more.


🚀 Quick Start

Installation

pip install heimr-ai

# Install Ollama for local AI analysis (recommended)
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.1:8b

Basic Analysis

# Analyze any load test result
# AI analysis runs automatically!
heimr analyze results.jtl --output report.md

# Creates 2 files automatically:
# - report.md (Markdown report)
# - report.pdf (PDF version)

With Full Observability

heimr analyze results.jtl \
  --prometheus http://localhost:9090 \
  --loki http://localhost:3100 \
  --tempo http://localhost:3200 \
  --output report.md

# Or use file paths instead of URLs:
heimr analyze results.jtl \
  --prometheus ./metrics.json \
  --loki ./logs.json \
  --tempo ./traces.json \
  --output report.md

Using a Config File

Instead of specifying all options on the command line, you can use a YAML config file:

# Generate template config
heimr config-init

# Use config file (CLI args override config values)
heimr analyze results.jtl --config heimr.yaml

Example heimr.yaml:

# Observability sources (URL or file path)
prometheus: http://localhost:9090
loki: http://localhost:3100
tempo: http://localhost:3200

# LLM configuration (defaults shown)
llm_url: http://localhost:11434/v1  # Ollama
llm_model: llama3.1:8b

# Output
output: ./reports/analysis.md

# Comparison (optional)
compare_baseline: ./baseline/results.json
compare_prometheus: ./baseline/metrics.json

See heimr.yaml.example for the full template with all options.

Result: Two comprehensive reports automatically generated:

  1. Markdown Report (report.md):

    • Statistical summary (P50, P95, P99, error rate)
    • Detected anomalies with timestamps
    • Infrastructure correlation (CPU spikes, memory leaks)
    • Log analysis (error patterns, warnings)
    • Trace analysis (slow spans, bottlenecks)
    • AI-generated root cause explanation and recommendations
  2. PDF Report (report.pdf):

    • Professional formatting with headers and page numbers
    • Suitable for stakeholder presentations
    • Automatically generated alongside markdown

Comparison Reports

Compare current results against a baseline for regression testing:

heimr analyze current.json \
  --compare-baseline baseline.json \
  --compare-prometheus baseline_metrics.json \
  --output report.md

# Creates additional comparison files:
# - report_comparison.md
# - report_comparison.pdf

🎬 See It In Action

Example Report Output

# ❌ FAILED
**Reasons**: Anomalies: 7, Memory Growth: 950%, Error/Warn Logs: 4

## Executive Summary
The load test revealed a critical memory leak causing gradual performance 
degradation. Average latency increased from 100ms to 3000ms over the test 
duration, with 7 anomalous spikes detected.

## Root Cause Analysis
1. **Memory Leak**: Heap usage grew from 100MB to 1GB (950% increase)
2. **GC Pressure**: Frequent garbage collection pauses (up to 5 seconds)
3. **Database Saturation**: Connection pool exhausted due to leaked connections

## Recommendations
1. Review connection pool management in `DatabaseClient.java`
2. Implement connection leak detection with HikariCP
3. Add heap dump analysis to identify leak source
4. Increase monitoring for connection pool metrics

🔐 Privacy & Security

Run Completely Local

No data ever leaves your infrastructure:

  • Local LLM: Use Llama 3.1 via Ollama (no API calls)

  • On-premise: All analysis runs on your hardware

  • Offline: Works without internet connectivity

Optional Cloud LLMs

For enhanced analysis, optionally use:

  • OpenAI ChatGPT-5.1

  • Anthropic Claude Sonnet 4.5

You control where your data goes.


🏢 Enterprise Features

  • Batch Analysis: Process hundreds of test results in parallel

  • Historical Trending: Track performance degradation over time

  • Custom Scenarios: Add your own failure patterns

  • CI/CD Integration: Automated analysis in your pipeline

  • Team Collaboration: Share reports and insights

  • SSO/RBAC: Enterprise authentication and access control

Contact us for enterprise licensing and support.


📊 Supported Failure Scenarios

Heimr recognizes 140+ common failure patterns, including:

Performance Issues:

  • Latency spikes (tail latency)

  • Bimodal distributions (cache misses)

  • Gradual degradation (memory leaks)

  • CPU saturation

  • Thread starvation

Infrastructure:

  • OOMKills

  • CPU throttling

  • Disk I/O saturation

  • Network packet loss

  • DNS latency

Application:

  • Database slow queries

  • Connection pool exhaustion

  • Cache stampedes

  • Message queue lag

  • Distributed deadlocks

And many more...


🛠️ Advanced Usage

Custom Prompts

Fine-tune LLM analysis for your domain:

heimr analyze results.jtl \
  --prompt-template custom_prompt.txt

Programmatic API

from heimr import Analyzer

config = {'prometheus': 'http://localhost:9090'}

analyzer = Analyzer(
    file_path="results.jtl",
    config=config,
    llm_model="llama3.1:8b"
)

result = analyzer.analyze()
print(result.status)
print(result.kpi)
print(result.llm_explanation)

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md for details.

For technical implementation details, see ARCHITECTURE.md.


🌟 Why "Heimr"?

In Norse mythology, Heimdallr (Heimr) is the all-seeing guardian who watches over the Bifrost bridge. Like its namesake, Heimr.ai watches over your performance tests, detecting issues before they reach production.

License

Heimr is licensed under the GNU Affero General Public License v3 (AGPL v3).

Open Source Usage

You are free to use, modify, and distribute Heimr under the terms of the AGPL v3 license, provided that:

  • Any modifications or derivative works you create are also licensed under AGPL v3
  • If you run Heimr as a network service (including SaaS offerings), you must make your modified source code available to your users
  • You retain all copyright notices and license information

For the full license text, see LICENSE.

Commercial Licensing

If you intend to use Heimr in a commercial product or service without open-sourcing your modifications, you are required to obtain a commercial license from the Heimr authors.

Commercial licensing allows you to:

  • Integrate Heimr into proprietary applications
  • Distribute Heimr without copyleft obligations
  • Keep your modifications and derivative works private
  • Use Heimr in closed-source SaaS offerings

Obtaining a Commercial License

Please contact us to discuss commercial licensing options:

We're flexible on licensing terms and happy to work with businesses of all sizes. Typical arrangements include:

  • One-time perpetual licenses
  • Deployment-based pricing
  • Revenue-share agreements
  • Custom terms based on your specific use case

Summary

Use Case License Required
Open source project using Heimr AGPL v3 (free)
Internal company use (non-public) AGPL v3 (free)
SaaS/web service offering Commercial License
Proprietary product integration Commercial License
Educational/research use AGPL v3 (free)
Modification and private redistribution AGPL v3 (free)

If you're unsure whether your use case requires a commercial license, please reach out—we'd rather clarify than have legal surprises down the road.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heimr_ai-0.1.0.tar.gz (79.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heimr_ai-0.1.0-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

Details for the file heimr_ai-0.1.0.tar.gz.

File metadata

  • Download URL: heimr_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 79.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for heimr_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b12d82e3a5b3dbec84ef263db660b043e3cc0ec2e0156bb7db6b3c67a6e05e78
MD5 91f7ffe371085e1372f8a74c4bfb2c05
BLAKE2b-256 c7802546ea7d0bccd1cc3001664429269af28387e625b2645b3300483ca9507f

See more details on using hashes here.

File details

Details for the file heimr_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: heimr_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 58.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for heimr_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da26f55c238e161824dcf445c65099ce509fb7a953c1bf3c0665572cc7b67261
MD5 5b2d43d188497bac4037380716260e68
BLAKE2b-256 c16c03b704f840de6a531871fc9bd992cf209daf1ba402b6292b01bcf2ffd07a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page