Merge pull request #552 from jaddr2line/queries-docs

Add /queries endpoint to API reference
This commit is contained in:
Jaden Weiss 2020-07-14 18:26:27 -04:00 committed by GitHub
commit c99d35a793
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -376,6 +376,27 @@ curl -XGET localhost:10101/status
}
```
### Get active queries
`GET /queries`
Returns the set of active queries. Supports pretty printing in `text/plain` format or JSON output in `application/json` format.
Also includes the amount of time that the query has been running (in nanoseconds when using JSON).
```request
curl -XGET localhost:10101/queries
```
```response
182.412µs All()
```
```request
curl -XGET -H "Accept: application/json" localhost:10101/queries
```
```response
[{"query":"All()","age":135123}]
```
### Recalculate Caches
`POST /recalculate-caches`