Test Ollama Models is a desktop benchmarking application for comparing local or remote Ollama-compatible language models through a simple Flet UI.
The app lets you configure a list of models and prompts, run the same question set against multiple models with configurable concurrency, inspect generated answers, and review latency, token, and tokens-per-second metrics collected during each run.
- Run the same prompt set against one or more configured models
- Control request concurrency to simulate parallel usage
- Watch test progress in real time from the main console and per-instance consoles
- Review generated answers in a dedicated tab
- Visualize historical and live metrics for latency, token count, and TPS
- Persist settings and run results in SQLite databases created automatically inside the
Data/directory - Organize the codebase by UI, Presenter, Application, Domain, Gateway, and Infrastructure layers
- Python 3.11
- Flet for the desktop UI
requestsfor HTTP calls to the Ollama API- SQLite for configuration and result storage
dependency-injectorfor wiring the applicationpytest,black,isort,flake8,mypy,bandit, andpre-commitfor development workflows
The application starts from main.py, builds the dependency container, and renders a tab-based Flet interface with four main areas:
Run Tests: select models, set concurrency, and execute benchmark runsAnswers: inspect collected model responses per instance or across all instancesMetrics: explore live and historical charts for latency, tokens, and TPSSettings: manage API connection parameters, model names, and the shared question list
During a run, the app:
- Loads the configured models and API endpoint.
- Performs a health check for each selected model.
- Sends each question to the Ollama
/api/generateendpoint. - Measures latency, token count, and tokens per second for every response.
- Saves raw per-instance results and averaged results into SQLite.
- Streams logs, answers, and chart data back into the UI through the internal event bus.
.
|-- app/
| |-- Application/ # Use cases and application services
| |-- DI/ # Dependency injection container
| |-- Domain/ # Core entities, scenarios, runner, metrics
| |-- Gateways/ # Ollama client and response parsing
| |-- Infrastructure/ # SQLite storage, retry policy, paths, defaults
| |-- Presenters/ # View models and presenter logic
| `-- UI/ # Flet views and reusable UI components
|-- tests/ # Unit, UI, and integration tests
|-- main.py # Application entry point
|-- Makefile # Developer commands
`-- requirements.txt # Python dependencies
- Python 3.11
- An available Ollama-compatible API endpoint
- At least one installed model exposed by that endpoint
python -m venv .venvActivate the environment:
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activateInstall dependencies:
pip install -r requirements.txtIf you have make available and want the full development toolchain as well, run:
make installStart the desktop application with:
python main.pyOn first launch, the app creates SQLite databases in Data/config.db and Data/results.db.
The default API configuration points to:
- Host:
192.168.194.21 - Port:
11434 - Path:
/api/generate
If your Ollama instance uses a different address, update it in the Settings tab before running tests.
- Open the
Settingstab and verify the API address, available models, and question list. - Return to
Run Testsand choose one or more models. - Set the desired concurrency level.
- Start the run and monitor the consoles.
- Open
Answersto inspect responses. - Open
Metricsto compare raw and averaged results, including historical runs.
The project stores data in SQLite:
Data/config.db: saved settings such as API address, models, and questionsData/results.db: benchmark runs, per-question results, and averaged metrics
These files are generated automatically and are not required to exist before the first run.
Useful commands from Makefile:
make format # black + isort
make lint # flake8
make mypy # static type checks
make test # pytest
make check # combined code quality checks
make bandit # security scan
make hooks # install pre-commit hooksThe repository includes:
- Unit tests for domain, gateway, presenter, and infrastructure behavior
- UI-oriented tests for view logic
- Integration coverage for the service flow
Run all tests with:
pytest- Model discovery is configuration-based: models are managed in the
Settingstab rather than fetched dynamically from Ollama. - Results are stored per run, which makes it possible to reload and compare historical metrics in the charts tab.
- The project already includes a clean separation between business logic and UI code, making it a good base for extending benchmarking scenarios or adding more model providers.