A Python tool for analyzing and visualizing GraphQL performance data from HAR files. Helps identify slow, unstable, and frequently called operations in GraphQL API.
- 📊 Analyzes GraphQL operations timing and patterns
- 🔍 Identifies problematic queries needing optimization
- 📈 Generates visual performance reports
- 📉 Shows timing distribution and breakdowns
- 🎯 Highlights operations exceeding performance thresholds
- Clone the repository:
git clone https://github.com/felistter/har-anayzer.git
cd har-anayzer
- Install dependencies: Install poetry as described in the official documentation.
poetry install
-
Record a HAR file using Chrome DevTools:
- Open DevTools (F12)
- Go to Network tab
- Check "Preserve log"
- Filter by "Fetch/XHR"
- Perform your operations
- Right-click → "Save all as HAR with content"
-
Run the analyzer:
poetry run python har_analyzer/main.py input.har output_prefix
This will generate:
output_prefix_metrics.csv
- Detailed metrics for all operationsoutput_prefix_response_times.png
- Distribution of response timesoutput_prefix_top_50_slow.png
- Top 50 slowest operations with frequency indicatorsoutput_prefix_timing_breakdown.png
- Timing phase analysis
- Bar length shows average response time
- Color intensity indicates call frequency (darker = more calls)
- Red dashed line marks 1000ms threshold
- Numbers in parentheses show call count
- Summary stats in bottom right corner
The tool identifies:
- Slow queries (above 95th percentile)
- Unstable queries (high variance)
- Frequently called queries
- Queries with large response sizes
Example output:
=== GraphQL Operations Analysis ===
Total Operations: 1500
Unique Operations: 45
Average Response Time: 235.7ms
95th Percentile Response Time: 892.3ms
- Only analyzes GraphQL POST requests
- Requires HAR files with complete request/response data
- Best used with Chrome DevTools HAR export