Skip to content

Commit

Permalink
πŸ“πŸš‘ Fix references to pyperf in docs
Browse files Browse the repository at this point in the history
Previously, the explicit hyperlinks were pointing to a wrong RTD
project and intersphinx-style references pointed to non-documented
objects.
This patch fixes that by plugging in the proper docs site through
intersphinx and using the existing entries.
  • Loading branch information
webknjaz committed Jan 15, 2024
1 parent fecf3d4 commit bcbd141
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
24 changes: 10 additions & 14 deletions docs/benchmark.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,24 @@ Introduction

Benchmarks allow to track performance from release to release and verify
that latest changes haven not affected it drastically. Benchmarks are based on
the `perf <https://perf.readthedocs.io>`_ module.
the :doc:`pyperf:index`.

How to run
----------

``requirements/dev.txt`` should be installed before we can proceed
with benchmarks. Please also make sure that you have
`configured <https://perf.readthedocs.io/en/latest/system.html>`_
your OS to have reliable results.
with benchmarks. Please also make sure that you have :doc:`configured
<pyperf:system>` your OS to have reliable results.

To run benchmarks next command can be executed:

.. code-block:: bash
$ python benchmarks/benchmark.py
This would run benchmarks for both classes (:class:`MultiDict` and
:class:`CIMultiDict`) of both implementations (``Python`` and
``Cython``).
This would run benchmarks for both classes (:class:`~multidict.MultiDict`
and :class:`~multidict.CIMultiDict`) of both implementations (``Python``
and ``Cython``).

To run benchmarks for a specific class of specific implementation
please use ``--impl`` option:
Expand All @@ -36,21 +35,18 @@ please use ``--impl`` option:
$ python benchmarks/benchmark.py --impl multidict_cython
would run benchmarks only for :class:`MultiDict` implemented
would run benchmarks only for :class:`~multidict.MultiDict` implemented
in ``Cython``.

Please use ``--help`` to see all available options. Most of the options are
described at `perf's Runner <https://perf.readthedocs.io/en/latest/runner.html>`_
documentation.
described at :doc:`perf's Runner <pyperf:runner>` documentation.

How to compare implementations
------------------------------

``--impl`` option allows to run benchmarks for a specific implementation of
class. Combined with the
`compare_to <https://perf.readthedocs.io/en/latest/cli.html#compare-to-cmd>`_
command of :mod:`perf` module we can get a good picture of how implementation
performs:
class. Combined with the :ref:`compare_to <pyperf:compare_to_cmd>` command of
:doc:`pyperf:index` we can get a good picture of how implementation performs:

.. code-block:: bash
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
pass

intersphinx_mapping = {
"pyperf": ("https://pyperf.readthedocs.io/en/latest", None),
"python": ("http://docs.python.org/3", None),
"aiohttp": ("https://aiohttp.readthedocs.io/en/stable/", None),
}
Expand Down

0 comments on commit bcbd141

Please sign in to comment.