comparison doc/rest.txt @ 6185:1cb2375015f0

Enable timing stats reporting in REST interface.
author John Rouillard <rouilj@ieee.org>
date Wed, 03 Jun 2020 00:52:32 -0400
parents acb9841bb4fd
children 0f0dedd2f95d
comparison
equal deleted inserted replaced
6184:c757a6a14c8d 6185:1cb2375015f0
134 **Sunset**: an http date after which the end point will not be available. 134 **Sunset**: an http date after which the end point will not be available.
135 135
136 will be returned. It should be used as a hint that the REST endpoint 136 will be returned. It should be used as a hint that the REST endpoint
137 will be going away. See https://tools.ietf.org/html/rfc8594 for 137 will be going away. See https://tools.ietf.org/html/rfc8594 for
138 details on this header and the sunset link type. 138 details on this header and the sunset link type.
139
140 Hyperdb Stats
141 =============
142
143 Adding ``@stats=true`` as a GET query parameter or POST data item will
144 augment the response with an ``@stats`` dictionary. Any value other
145 than ``true`` (any case) will disable the ``@stats`` dictionary. When
146 stats are enabled the response includes an ``@stats`` member and looks
147 like::
148
149 { "data": {
150 ...
151 "@stats": {
152 "cache_hits": 3,
153 "cache_misses": 1,
154 "get_items": 0.0009722709655761719,
155 "filtering": 0,
156 "elapsed": 0.04731464385986328
157 }
158 }
159 }
160
161 These are the same values returned in the html interface by setting
162 the ``CGI_SHOW_TIMING`` environment variable. By default performance
163 stats are not shown. The fields are subject to change. An
164 understanding of the code is recommended if you are going to use this
165 info.
139 166
140 Versioning 167 Versioning
141 ========== 168 ==========
142 169
143 Currently there is only one version of the API. Versions are simple 170 Currently there is only one version of the API. Versions are simple

Roundup Issue Tracker: http://roundup-tracker.org/