GeoBench is a tool designed to benchmark geospatial software. It allows users to run benchmarks based on scenarios specified in YAML files or directly in Jupyter notebooks. This project is currently under development.
Before you begin, ensure you have the following installed:
- Operating System: Linux, Windows (with WSL2 or Powershell), MacOS
- Python: Python 3 with the
pip
package manager installed
Follow these steps to set up GeoBench:
-
Clone the repository:
git clone https://github.com/ITC-CRIB/geobench cd geobench
-
Pull the repository:
cd geobench git pull
- Using
pip
pip install .
- Using
uv
- Install
uv
tool- MacOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
- Windows (from Powershell/Terminal)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- Run the installation process
uv tool install . --upgrade
- Install
- To run the program you can execute following command:
geobench scenario.yaml
-
Set up and activate the Python environment:
-
Using
venv
:python3 -m venv .venv source .venv/bin/activate # On Windows, use `.venv\Scripts\activate` pip install -r requirements.txt
-
**Using
uv
(recommended) **:
uv sync
-
-
To run the program during development (without installing it as tool), you can execute following command:
python -m geobench.cli scenario.yaml
A benchmarking scenario is represented in a YAML file. For the time being, there are two scenario types supported in this tool: qgis-process
and qgis-python
. The qgis-json
and arcgis-command
will be supported later.
In addition to YAML scenarios, GeoBench now supports benchmarking directly within Jupyter notebooks. This is useful for benchmarking Python code interactively.
Feel free to contribute to the development of GeoBench by submitting issues or pull requests on the repository. For more details on contributing, please refer to the CONTRIBUTING.md file in the repository.
GeoBench now supports benchmarking directly within Jupyter notebooks. There are three ways to use this functionality:
from geobench import Geobench
# Create a benchmark instance
bench = Geobench(
name="my-benchmark",
outdir="results",
run_monitor=2.0,
clean=True
)
# Start benchmarking
bench.start("my-function")
# Run your code
result = my_function()
# Finish benchmarking
bench.stop(True) # Pass True for success, False for failure
# Generate HTML report
bench.generate_report()
from geobench import geobench
@geobench(name="my-function-benchmark", outdir="results", clean=True)
def my_function():
# Your code here
return result
# Call the decorated function
result = my_function()