SXXXXXXX_ProfileAnalyzer/README.md
2025-06-23 14:43:56 +02:00

127 lines
4.8 KiB
Markdown

### Versione in Italiano (per `README.md`)
# Python Profile Analyzer
**Un analizzatore di performance visuale e interattivo per Python.**
Python Profile Analyzer è un'applicazione desktop che aiuta gli sviluppatori a identificare i colli di bottiglia nel codice Python. Trasforma l'output testuale del profiler `cProfile` in viste interattive, rendendo l'ottimizzazione più rapida e intuitiva.
![Screenshot dell'applicazione](screenshot.png)
*(Nota: Sostituisci `screenshot.png` con uno screenshot reale dell'applicazione)*
## Caratteristiche Principali
* **Analisi Multi-Vista**: Esamina i dati attraverso una **tabella ordinabile**, una vista testuale e un **grafo delle chiamate** (call graph) con codice colore per evidenziare le funzioni più lente.
* **Esecuzione Integrata**: Configura ed esegui il profiling di script o moduli direttamente dall'applicazione.
* **Navigazione Interattiva**: Seleziona una funzione per scoprire istantaneamente chi la chiama (**Callers**) e cosa chiama (**Callees**).
* **Filtro Rapido**: Isola le funzioni di interesse con una ricerca testuale in tempo reale.
* **Esportazione CSV**: Salva i dati per analisi o reportistica esterna.
## Installazione Rapida
1. **Clona il repository**:
```bash
git clone <URL_DEL_TUO_REPOSITORY_GITEA>
cd <NOME_DELLA_CARTELLA>
```
2. **Crea un ambiente virtuale e installa le dipendenze**:
```bash
# Crea e attiva l'ambiente virtuale
python -m venv venv
source venv/bin/activate # Su Windows: venv\Scripts\activate
# Installa le librerie
pip install graphviz Pillow
```
3. **Installa Graphviz** (Requisito per la Vista a Grafo):
Questa è una dipendenza di sistema, non solo una libreria Python. Visita il [sito ufficiale di Graphviz](https://graphviz.org/download/) per scaricare e installare il software adatto al tuo sistema operativo. **Assicurati di aggiungerlo al PATH di sistema durante l'installazione.**
## Avvio
Per lanciare l'applicazione, esegui il comando seguente dalla cartella principale del progetto:
```bash
python -m profileanalyzer
```
## Documentazione
Per una guida dettagliata all'utilizzo, esempi pratici e suggerimenti su come interpretare i risultati, consulta i manuali utente completi:
* [Manuale Utente (Italiano)](./USER_MANUAL_IT.md)
* [User Manual (English)](./USER_MANUAL_EN.md)
*(Nota: Assicurati che i nomi dei file (`USER_MANUAL_IT.md` e `USER_MANUAL_EN.md`) corrispondano a quelli che userai nel tuo repository)*
### Versione in Inglese (per `README.md`)
# Python Profile Analyzer
**A visual and interactive performance profiler for Python.**
Python Profile Analyzer is a desktop application that helps developers identify bottlenecks in their Python code. It transforms the standard text output of the `cProfile` profiler into interactive views, making optimization faster and more intuitive.
![Application Screenshot](screenshot.png)
*(Note: Replace `screenshot.png` with an actual screenshot of the application)*
## Key Features
* **Multi-View Analysis**: Examine your data through a **sortable table**, a raw text view, and a heat-mapped **call graph** that highlights the slowest functions.
* **Integrated Runner**: Configure and run the profiler on your scripts or modules directly from the application.
* **Interactive Navigation**: Select any function to instantly discover its **Callers** and **Callees**.
* **Quick Filter**: Isolate functions of interest with a real-time text search.
* **CSV Export**: Save your data for external analysis or reporting.
## Quick Installation
1. **Clone the repository**:
```bash
git clone <YOUR_GITEA_REPOSITORY_URL>
cd <PROJECT_FOLDER_NAME>
```
2. **Create a virtual environment and install dependencies**:
```bash
# Create and activate the virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install libraries
pip install graphviz Pillow
```
3. **Install Graphviz** (Required for the Graph View):
This is a system dependency, not just a Python library. Visit the [official Graphviz website](https://graphviz.org/download/) to download and install the software for your operating system. **Make sure to add it to your system's PATH during installation.**
## Getting Started
To launch the application, run the following command from the project's root directory:
```bash
python -m profileanalyzer
```
## Documentation
For a detailed guide on usage, practical examples, and tips on how to interpret the results, please refer to the full user manuals:
* [User Manual (English)](./USER_MANUAL_EN.md)
* [Manuale Utente (Italiano)](./USER_MANUAL_IT.md)
*(Note: Ensure the filenames (`USER_MANUAL_EN.md` and `USER_MANUAL_IT.md`) match those you will use in your repository)*