Skip to content

Commit 0d0f886

Browse files
committed
Document new ijson.benchmark module
Signed-off-by: Rodrigo Tobar <[email protected]>
1 parent f2f45e3 commit 0d0f886

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
* Removed support for Python 2.7 and 3.4,
66
3.5+ is still supported.
7+
* Distribute the existing `benchmark.py` script
8+
as ``ijson.benchmark``.
9+
The module is an improved version of the script,
10+
supporting #iterations for a given function invocation,
11+
multiple input files,
12+
and more.
713

814
## [3.2.3]
915

README.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,28 @@ For example::
175175
Using ``-h/--help`` will show all available options.
176176

177177

178+
.. _benchmarking:
179+
180+
Benchmarking
181+
------------
182+
183+
A command line utility is included with ijson
184+
to help benchmarking the different methods offered by the package.
185+
It offers some built-in example inputs
186+
that try to mimic different scenarios,
187+
but more importantly it also supports user-provided inputs.
188+
You can also specify which backends to time,
189+
number of iterations,
190+
and more.
191+
192+
The tool is available by running the ``ijson.benchmark`` module.
193+
For example::
194+
195+
$> python -m ijson.benchmark my/json/file.json -m items -p values.item
196+
197+
Using ``-h/--help`` will show all available options.
198+
199+
178200
``bytes``/``str`` support
179201
-------------------------
180202

@@ -493,6 +515,10 @@ out of ijson:
493515
might show better performance.
494516
See options_ for details.
495517

518+
The benchmarking_ tool should help
519+
with trying some of these options
520+
and observing their effect on your input files.
521+
496522

497523
.. _faq:
498524

0 commit comments

Comments
 (0)