__init__.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # MODULE: grass.benchmark
  2. #
  3. # AUTHOR(S): Vaclav Petras <wenzeslaus gmail com>
  4. #
  5. # PURPOSE: Benchmarking for GRASS GIS modules
  6. #
  7. # COPYRIGHT: (C) 2021 Vaclav Petras, and by the GRASS Development Team
  8. #
  9. # This program is free software under the GNU General Public
  10. # License (>=v2). Read the file COPYING that comes with GRASS
  11. # for details.
  12. """Benchmarking for GRASS GIS modules
  13. This subpackage of the grass package is experimental and the API can change anytime.
  14. The API of the package is defined by what is imported in the top-level ``__init__.py``
  15. file of the subpackage.
  16. The functions in the Python API raise exceptions, although calls of other functions from
  17. the grass package may call grass.script.fatal and exit
  18. (see :func:`grass.script.core.set_raise_on_error` for changing the behavior).
  19. This applies to the CLI interface of this subpackage too except that raised usage
  20. exceptions originating in the CLI code result in *sys.exit* with an error message, not
  21. traceback. Messages and other user-visible texts in this package are not translatable.
  22. """
  23. from .plots import nprocs_plot, num_cells_plot
  24. from .results import (
  25. join_results,
  26. join_results_from_files,
  27. load_results,
  28. load_results_from_file,
  29. save_results,
  30. save_results_to_file,
  31. )
  32. from .runners import benchmark_nprocs, benchmark_resolutions, benchmark_single