summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-07-13 15:22:21 -0300
committerdrebs <drebs@leap.se>2017-07-13 15:22:21 -0300
commit1d79d987cc64d3d19d692babf5d895384c68947b (patch)
tree8cdd7f29486d176f73d7e4da2c93d81be4ecd566
parentd1abf301c75548938009a650ec953920ac9bdd1e (diff)
[doc] add image example to benchmark with python page
-rw-r--r--docs/misc/benchmarks-python-graphs.pngbin0 -> 26295 bytes
-rw-r--r--docs/misc/benchmarks-python-graphs.rst12
2 files changed, 9 insertions, 3 deletions
diff --git a/docs/misc/benchmarks-python-graphs.png b/docs/misc/benchmarks-python-graphs.png
new file mode 100644
index 00000000..1577c589
--- /dev/null
+++ b/docs/misc/benchmarks-python-graphs.png
Binary files differ
diff --git a/docs/misc/benchmarks-python-graphs.rst b/docs/misc/benchmarks-python-graphs.rst
index 4d1db339..79d34925 100644
--- a/docs/misc/benchmarks-python-graphs.rst
+++ b/docs/misc/benchmarks-python-graphs.rst
@@ -5,6 +5,15 @@ This page documents an example of how to query elasticsearch and plot the
results with python. We are currently using ``kibana`` to plot and show graphs,
but in the future we might want/need the flexibility of python for that.
+Generated image
+---------------
+
+.. image:: benchmarks-python-graphs.png
+ :alt: Example of image generated with the code above.
+
+Code example
+------------
+
Some notes about the code example:
* Depends on ``elasticsearch`` for querying and ``matplotlib`` for plotting.
@@ -12,9 +21,6 @@ Some notes about the code example:
* Commit datetime ranges (`1 <https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html>`_, `2 <https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#date-math>`_, `3 <https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-daterange-aggregation.html#date-format-pattern>`_) can be put in place to limit results.
-Code example
-------------
-
.. code:: python
#!/usr/bin/env python