A web-based performance trace analyzer that helps you visualize and analyze JSON trace files. Upload your performance traces and get detailed insights into execution patterns, function statistics, and performance metrics.
- 📤 Upload JSON trace files (up to 200MB)
- 📊 Analyze performance metrics and function statistics
- 💡 Generate automated performance insights
- 🎨 Interactive web interface
- ⚡ Fast analysis powered by FastAPI
Before running this project, ensure you have:
- Python 3.8+ installed
- pip (Python package manager)
- macOS, Linux, or Windows with bash or similar shell
- Clone or download this repository
- Navigate to the project directory:
cd perf-trace-analyzer - Run the start script:
bash start.sh
The script will:
- Create a Python virtual environment (if not already present)
- Install all dependencies from
requirements.txt - Start the FastAPI server
- Automatically open your browser to
http://localhost:8765
To stop the server: Press Ctrl+C in the terminal
-
Navigate to the project directory:
cd perf-trace-analyzer -
Create a Python virtual environment:
python3 -m venv .venv
-
Activate the virtual environment:
- macOS/Linux:
source .venv/bin/activate - Windows (Command Prompt):
.venv\Scripts\activate
- Windows (PowerShell):
.\.venv\Scripts\Activate.ps1
- macOS/Linux:
-
Install dependencies:
pip install -r requirements.txt
-
Start the server:
uvicorn backend.main:app --host 0.0.0.0 --port 8765 --reload
-
Open your browser and navigate to:
http://localhost:8765
- Open the web interface at
http://localhost:8765 - Upload a trace file (JSON format, up to 200MB)
- View results:
- Performance statistics
- Function call analysis
- Generated insights and recommendations
Returns the main web interface (HTML page)
Analyzes an uploaded trace file
Request:
- Content-Type:
multipart/form-data - File parameter:
file(JSON trace file)
Response:
{
"filename": "trace.json",
"insights": [...],
"statistics": {...}
}Errors:
400: File is not a JSON file413: File exceeds 200MB limit500: Parse error during analysis
perf-trace-analyzer/
├── README.md # This file
├── requirements.txt # Python dependencies
├── start.sh # Start script for quick launch
├── backend/
│ ├── __init__.py
│ ├── main.py # FastAPI application
│ └── analyzer.py # Trace analysis logic
└── frontend/
├── index.html # Main UI
└── static/ # CSS, JavaScript, assets
- FastAPI (0.115.6) - Modern Python web framework
- Uvicorn (0.32.1) - ASGI server
- python-multipart (0.0.20) - File upload handling
If port 8765 is already in use, modify the start command:
uvicorn backend.main:app --host 0.0.0.0 --port 8000If the virtual environment doesn't work properly, recreate it:
rm -rf .venv
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtMake the script executable:
chmod +x start.shThe --reload flag in the uvicorn command enables auto-reload during development. Changes to Python files will automatically restart the server.
[Add license information if applicable]
For issues or questions, please check the project repository or contact the development team.